cisco / openh264

Open Source H.264 Codec
BSD 2-Clause "Simplified" License
5.56k stars 1.8k forks source link

OpenH264 failed to build due to error LNK2001: unresolved external symbol _WelsThreadCreate with MSVC on windows. #3188

Open spacelg opened 5 years ago

spacelg commented 5 years ago

Environment: VS 2017 + Windows Server 2016

Issue description: We tried to build OpenH264 and it failed to build due to error LNK2001: unresolved external symbol _WelsThreadCreate with MSVC on windows. It can be first reproduced on latest revision c185ac3. Could you look at this issue? Thanks a lot.

Repro steps:

  1. git clone https://github.com/cisco/openh264 D:\OpenH264\src
  2. Open a clean x86 prompt and browse to D:\OpenH264
  3. msbuild /p:Configuration=Release;Platform=Win32 /p:WindowsTargetPlatformVersion=10.0.17134.0 .\src\test\build\win32\codec_ut\Codec_UT.sln /t:Rebuild

log_x86_build.log

Error info: welsdcore.lib(wels_decoder_thread.obj) : error LNK2001: unresolved external symbol _WelsThreadCreate [D:\OpenH264\src\codec\build\win32\dec\WelsDecPlus.vcxproj] welsdcore.lib(wels_decoder_thread.obj) : error LNK2001: unresolved external symbol _WelsThreadJoin [D:\OpenH264\src\codec\build\win32\dec\WelsDecPlus.vcxproj] welsdcore.lib(wels_decoder_thread.obj) : error LNK2001: unresolved external symbol _WelsQueryLogicalProcessInfo [D:\OpenH264\src\codec\build\win32\dec\WelsDecPlus.vcxproj] .........\bin\Win32\Release\welsdec.dll : fatal error LNK1120: 3 unresolved externals [D:\OpenH264\src\codec\build\win32\dec\WelsDecPlus.vcxproj] Done Building Project "D:\OpenH264\src\codec\build\win32\dec\WelsDecPlus.vcxproj" (Rebuild target(s)) -- FAILED. Project "D:\OpenH264\src\test\build\win32\codec_ut\Codec_UT.sln" (1) is building "D:\OpenH264\src\codec\build\win32\enc\WelsEncPlus.vcxproj" (7) on node 1 (Rebuild target(s)).

spacelg commented 5 years ago

Hi All,

Could someone look at this issue ?

Thanks, Lin

spacelg commented 4 years ago

Hi, All,

Could someone look at this issue ? It can still reproduce on latest revision 4b2a2f0.

Thanks, Lin

215020267 commented 4 years ago

@borzun Thanks for your help! We got the latest version of master branch, and applied the patch of you provided.We tried to build OpenH264 and it passed. could you merge your changes to the master branch? thanks a lot.

borzun commented 4 years ago

@215020267 Sorry, I'm not working for CISCO, and I don't have rights to merge PR into master. But glad that my changes helped you.

GuangweiWang commented 4 years ago

@borzun @215020267 merged.