unable to build OpenH264.lib for windows unable to build OpenH264.lib for windows windows windows

unable to build OpenH264.lib for windows


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 youmentioned https://github.com/cisco/openh264).
  • ii) Now you will find two visual studio compatible projects indirectory /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. enter image description here
  • vi) Then You can either select static or dynamic library in generaloptions.enter image description here
  • 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 thoseare 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.. :)


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_VIOLATION564 [main] make 3888 open_stackdumpfile: Dumping stack trace to make.exe.stackdump  0 [main] make 5448 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION561 [main] make 5448 open_stackdumpfile: Dumping stack trace to make.exe.stackdumpcopying dll files to destination folder...FullDestDir is E:\projects\openh264\bin\x64\Debugcurrent dir is:E:\projects\openh264DestDir is bin/x64/Debugcp: cannot stat `openh264.dll': No such file or directorycp: cannot stat `openh264.lib': No such file or directorycp: cannot stat `openh264.pdb': No such file or directorycp: cannot stat `codec_unittest.exe': No such file or directorycp: cannot stat `h264enc.exe': No such file or directorycp: 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.