Windows: How to build X264.lib instead of .dll

我的未来我决定 提交于 2019-12-03 21:13:14

After the latest update of x264 you can build static library usable by MSVS project. For such library compilation you will need:

  1. MSYS and MSVS 2013 Update 2 (express version [for Windows Desktop] would also work if you install Update 2)
  2. run "VS2013 x86 Native Tools Command Prompt" or "VS2013 x64 Native Tools Command Prompt" depending what version (32 or 64-bit) you want to build
  3. change dir to x264 path and run MSYS shell (sh)
  4. from shell run "CC=cl ./configure --disable-cli --enable-static" for x264 configuring
  5. run "make" which should build libx264.lib usable from MSVS

P.S. MSVS builds would be a little bit slower than one build by MinGW

user1632344

Matthew Oliver has a GIT repository of a patched x264 source tree (https://github.com/ShiftMediaProject/x264) that compiles natively in VS2013 update 2 and later. It requires installing a YASM version for VS.

It worked pretty much straight out of the box for me, though I did have to change the VSYASM parameter "-f Win32" to "-f win32" for a 32bit build

Take a look here: http://siliconandlithium.blogspot.no/2014/03/building-x264-on-windows-with-visual.html

Static lib is not possible in windows as per my knowledge.

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