Fix registry error and use [MT] to rebuild zlib, x264 and libyuv

This commit is contained in:
yuanyuanxiang
2025-11-29 10:32:35 +01:00
parent 9a3277d638
commit f891b1a585
9 changed files with 149 additions and 16 deletions

View File

@@ -168,6 +168,7 @@
<ClCompile Include="AudioManager.cpp" />
<ClCompile Include="Buffer.cpp" />
<ClCompile Include="CaptureVideo.cpp" />
<ClCompile Include="clang_rt_compat.c" />
<ClCompile Include="ClientDll.cpp" />
<ClCompile Include="Common.cpp" />
<ClCompile Include="FileManager.cpp" />

39
client/clang_rt_compat.c Normal file
View File

@@ -0,0 +1,39 @@
// clang_rt_compat.c
// 兼容 32 位 Clang 编译的 libx264 运行时函数
#ifdef _M_IX86
#pragma comment(linker, "/alternatename:__ultof3=_ultof3_impl")
#pragma comment(linker, "/alternatename:__dtoul3_legacy=_dtoul3_impl")
#pragma comment(linker, "/alternatename:__dtol3=_dtol3_impl")
#pragma comment(linker, "/alternatename:__ltod3=_ltod3_impl")
#pragma comment(linker, "/alternatename:__ultod3=_ultod3_impl")
// unsigned long long to float
float __cdecl ultof3_impl(unsigned long long a) {
return (float)a;
}
// double to unsigned long long
unsigned long long __cdecl dtoul3_impl(double a) {
if (a < 0) return 0;
if (a >= 18446744073709551616.0) return 0xFFFFFFFFFFFFFFFFULL;
return (unsigned long long)a;
}
// double to long long
long long __cdecl dtol3_impl(double a) {
return (long long)a;
}
// long long to double
double __cdecl ltod3_impl(long long a) {
return (double)a;
}
// unsigned long long to double
double __cdecl ultod3_impl(unsigned long long a) {
return (double)a;
}
#endif

View File

@@ -178,6 +178,7 @@
<ClCompile Include="AudioManager.cpp" />
<ClCompile Include="Buffer.cpp" />
<ClCompile Include="CaptureVideo.cpp" />
<ClCompile Include="clang_rt_compat.c" />
<ClCompile Include="ClientDll.cpp" />
<ClCompile Include="Common.cpp" />
<ClCompile Include="FileManager.cpp" />