Skip to content

Switch to x64_x86 cross tools for VS#3188

Open
hwangsihu wants to merge 2 commits into
masterfrom
debug-windows-cross
Open

Switch to x64_x86 cross tools for VS#3188
hwangsihu wants to merge 2 commits into
masterfrom
debug-windows-cross

Conversation

@hwangsihu
Copy link
Copy Markdown
Contributor

  • Switch to x86_64 cross tools for VS
  • Fix compile errors on FFmpeg

@hwangsihu hwangsihu changed the title debug windows cross Switch to x86_64 cross tools for VS Mar 24, 2026
@hwangsihu hwangsihu marked this pull request as ready for review March 24, 2026 15:07
@hwangsihu hwangsihu requested review from a team and bear101 as code owners March 24, 2026 15:07
@hwangsihu hwangsihu force-pushed the debug-windows-cross branch 4 times, most recently from 831c260 to 9c59954 Compare March 30, 2026 12:06
@hwangsihu hwangsihu changed the title Switch to x86_64 cross tools for VS Switch to x64_x86 cross tools for VS Mar 30, 2026
@hwangsihu hwangsihu force-pushed the debug-windows-cross branch from 9c59954 to de2cb1f Compare March 30, 2026 13:59
@bear101
Copy link
Copy Markdown
Contributor

bear101 commented Apr 1, 2026

I still cannot build win32 using the vcvarsamd64_x86.bat. I get a bunch of linker errors in FFmpeg.

@hwangsihu
Copy link
Copy Markdown
Contributor Author

Could you please send me the exact error message? The build works fine for me.

@bear101
Copy link
Copy Markdown
Contributor

bear101 commented Apr 2, 2026

Here's build errors I get when linking:

         TeamTalk5DLL.dir\Release\WinFirewall.obj
         TeamTalk5DLL.dir\Release\Convert.obj
         TeamTalk5DLL.dir\Release\TTClientMsg.obj
         TeamTalk5DLL.dir\Release\TeamTalk.obj
         ACE_INet_SSLs.lib(HTTPS_SessionFactory.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
            Creating library C:/tt5dist/TeamTalk5_x86/TeamTalk5/Library/TeamTalk_DLL/TeamTalk5.lib and object C:/tt5dist/TeamTalk5_x86/TeamTalk5/Library/TeamTalk_DLL/TeamTalk5.exp
    12>avfilter.lib(af_afir_init.o) : error LNK2001: unresolved external symbol _ff_fcmul_add_sse3 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(af_afir_init.o) : error LNK2001: unresolved external symbol _ff_fcmul_add_avx [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(af_afir_init.o) : error LNK2001: unresolved external symbol _ff_fcmul_add_fma3 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(af_anlmdn_init.o) : error LNK2001: unresolved external symbol _ff_compute_distance_ssd_sse [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(af_volume_init.o) : error LNK2001: unresolved external symbol _ff_scale_samples_s16_sse2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(af_volume_init.o) : error LNK2001: unresolved external symbol _ff_scale_samples_s32_sse2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(af_volume_init.o) : error LNK2001: unresolved external symbol _ff_scale_samples_s32_ssse3_atom [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(af_volume_init.o) : error LNK2001: unresolved external symbol _ff_scale_samples_s32_avx [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blackdetect_init.o) : error LNK2001: unresolved external symbol _ff_blackdetect_8_avx2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blackdetect_init.o) : error LNK2001: unresolved external symbol _ff_blackdetect_16_avx2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_addition_sse2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_addition_avx2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_grainmerge_sse2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_grainmerge_avx2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_average_sse2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_average_avx2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_and_sse2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_and_avx2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_darken_sse2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_darken_avx2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_grainextract_sse2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_grainextract_avx2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_multiply_sse2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]
    12>avfilter.lib(vf_blend_init.o) : error LNK2001: unresolved external symbol _ff_blend_multiply_avx2 [C:\tt5dist\TeamTalk5_x86\TeamTalk5\Build\build-win32\Library\TeamTalkLib\TeamTalk5DLL.vcxproj]

@hwangsihu
Copy link
Copy Markdown
Contributor Author

HMM, Did you test this on the latest commit? It compiles normally in GH Actions without these errors.

@bear101
Copy link
Copy Markdown
Contributor

bear101 commented Apr 5, 2026

HMM, Did you test this on the latest commit? It compiles normally in GH Actions without these errors.

Yes, latest commit. It fails with the same error both with the "cross tool" and normal "x86" VS command prompt.

I also mentioned the build issue here: #3162

I wonder if it's because I'm using some different version of CLang on Windows.

@hwangsihu
Copy link
Copy Markdown
Contributor Author

Doesn't WebRTC only use Clang? Anyway, try using CLANG for MSVC.

@hwangsihu hwangsihu force-pushed the debug-windows-cross branch from de2cb1f to b0e6742 Compare April 7, 2026 13:40
@hwangsihu hwangsihu force-pushed the debug-windows-cross branch 4 times, most recently from 9fe922a to f026ab3 Compare April 29, 2026 12:20
@hwangsihu hwangsihu force-pushed the debug-windows-cross branch from f026ab3 to 0c241a0 Compare May 4, 2026 07:14
@hwangsihu hwangsihu force-pushed the debug-windows-cross branch from 0c241a0 to 16e4487 Compare May 13, 2026 09:37
@hwangsihu hwangsihu force-pushed the debug-windows-cross branch from 16e4487 to 2eccceb Compare May 21, 2026 11:21
@bear101
Copy link
Copy Markdown
Contributor

bear101 commented May 25, 2026

What is the purpose of this PR?

@hwangsihu
Copy link
Copy Markdown
Contributor Author

When compiling to 32-bit on a 64-bit system, it is recommended to use cross-tools instead of native tools, because the compiler is 64-bit, not 32-bit. It also resolves the build error that @CoBC is experiencing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants