unable to build OpenH264.lib for windows

与世无争的帅哥 提交于 2019-12-04 12:20:39

问题


I followed all the instruction mentioned in https://github.com/cisco/openh264 but I am unable to get through. The information is cited in link but its quite confusing.


回答1:


Alternative Way:
You can build Openh264 using visual studio in windows. Here are the steps..

  • i) Download OpenH264 source code provided by cisco (that already you mentioned https://github.com/cisco/openh264).
  • ii) Now you will find two visual studio compatible projects in directory /OpenH264/codec/build/win32/dec and /OpenH264/codec/build/win32/enc.
  • iii) You will need to download NASM software from http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/
  • iv) Install NASM software on the directory C:\NASM or wherever you like.
  • v) Then Add NASM executable path to all these visual studio projects.
  • vi) Then You can either select static or dynamic library in general options.
  • vi) If you are able to perform all these operations successfully, you will have 5 different .lib or .dll files named welsdcore, welsdecplus, welsecore, welsencplus, welsvp and those are usable in any visual studio projects.

Now if you want to get openh264 features, just add all these libraries to your project and enjoy. Hope it will help you.. :)




回答2:


I also had some difficulty building openh264 on Windows using the recommended mingw approach.

In my case make crashed for all configurations I tried:

bash -c "make OS=msvc  ARCH=x86_64 USE_ASM=No BUILDTYPE=Debug clean"
bash -c "make OS=msvc  ARCH=x86_64 USE_ASM=No BUILDTYPE=Debug"
  0 [main] make 3888 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
564 [main] make 3888 open_stackdumpfile: Dumping stack trace to make.exe.stackdump
  0 [main] make 5448 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
561 [main] make 5448 open_stackdumpfile: Dumping stack trace to make.exe.stackdump
copying dll files to destination folder...
FullDestDir is E:\projects\openh264\bin\x64\Debug
current dir is:
E:\projects\openh264
DestDir is bin/x64/Debug
cp: cannot stat `openh264.dll': No such file or directory
cp: cannot stat `openh264.lib': No such file or directory
cp: cannot stat `openh264.pdb': No such file or directory
cp: cannot stat `codec_unittest.exe': No such file or directory
cp: cannot stat `h264enc.exe': No such file or directory
cp: cannot stat `h264dec.exe': No such file or directory
 BuildDebugFlag   =1
 BuildReleaseFlag =0
 BuildDebugInfo   ="build debug--failed"
 BuildReleaseInfo =NULL
 aBuildFlagList is 1  0
 ReturnCode is 1

I resorted to converting the existing solution/projects (VS2008) to VS2013 and linking/building with the created .lib files.

You can find the solutions in {openh264_dir}\codec\build\win32\enc and {openh264_dir}\codec\build\win32\dec. Building the solution will create .libs and .dlls in {openh264_dir}\bin\Win32\Release

To link to the lib, you need to link to welsenc.lib.

When running, you need to have both the welsenc.dll and welsvp.dll in your application directory. So far it seems to have worked fine for my usage. I'm assuming that building the decoder will be similar.



来源:https://stackoverflow.com/questions/30045356/unable-to-build-openh264-lib-for-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!