FFmpeg与VS2010

编译FFmpeg是一件痛苦的事情,一般都直接使用Zeranoe FFmpeg Builds

如果使用这个版本,需要注意ffmpeg的帮助里的一段话:

To create import libraries that work with the /OPT:REF option (which is enabled by default in Release mode), follow these steps:

Open the Visual Studio Command Prompt.
Alternatively, in a normal command line prompt, call ‘vcvars32.bat’ which sets up the environment variables for the Visual C++ tools (the standard location for this file is something like ‘C:Program Files (x86_Microsoft Visual Studio 10.0VCinvcvars32.bat’).

Enter the ‘bin’ directory where the created LIB and DLL files are stored.
Generate new import libraries with lib.exe:
 	
lib /machine:i386 /def:..libfoo-version.def  /out:foo.lib
Replace foo-version and foo with the respective library names.

即根据dll重新生成lib文件。

否则Relesae下就会出问题。


这是VS2010的一个bug,据说VS2012后已经修复。

原文地址:https://www.cnblogs.com/aiwz/p/6333110.html