写一个备忘在这里,免得下次不记得了,又从头再来。
ffmpeg compile with Visual C++ compatibility
ffmpeg compile with Visual C++ compatibility
- Install Visual C++ (if you haven't done so already).
- Install MinGW and MSYS as described above.
- Add a call to `vcvars32.bat' (which sets up the environment variables for the Visual C++ tools) as the first line of `msys.bat'. The standard location for `vcvars32.bat' is `C:/Program Files/Microsoft Visual Studio 8/VC/bin/vcvars32.bat', and the standard location for `msys.bat' is `C:/msys/1.0/msys.bat'. If this corresponds to your setup, add the following line as the first line of `msys.bat':
call "C:/Program Files/Microsoft Visual Studio 8/VC/bin/vcvars32.bat" - Start the MSYS shell (file `msys.bat') and type
link.exe. If you get a help message with the command line options oflink.exe, this means your environment variables are set up correctly, the Microsoft linker is on the path and will be used by FFmpeg to create Visual-C++-compatible import libraries. - Extract the current version of FFmpeg and change to the FFmpeg directory.
- Type the command
./configure --enable-shared --disable-static --enable-memalign-hackto configure and, if that didn't produce any errors, typemaketo build FFmpeg. - The subdirectories `libavformat', `libavcodec', and `libavutil' should now contain the files `avformat.dll', `avformat.lib', `avcodec.dll', `avcodec.lib', `avutil.dll', and `avutil.lib', respectively. Copy the three DLLs to your System32 directory (typically `C:/Windows/System32').
本文详细介绍了如何使用Visual C++工具链编译FFmpeg。首先安装必要的开发环境,包括Visual C++和MinGW等,然后配置环境变量确保链接器正确工作。最后通过指定配置选项来编译生成兼容Visual C++的FFmpeg库。
3212

被折叠的 条评论
为什么被折叠?



