FFmpeg与VS2010

Posted 力为

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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.0\\VC\\bin\\vcvars32.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:..\\lib\\foo-version.def  /out:foo.lib
Replace foo-version and foo with the respective library names.

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

否则Relesae下就会出问题。


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

以上是关于FFmpeg与VS2010的主要内容,如果未能解决你的问题,请参考以下文章

如何用vs08编译ffmpeg

vs2010直接调用av_register_all crash问题

vs2019配置ffmpeg

与 VS2017 和 FFMPEG 4 完全矛盾的未解决的外部符号 + 未使用的库

WINDOWS+VS2012+msys2编译ffmpeg成功,DLL不能用

用VS2013编译FFMPEG232