以下加粗的内容参考这篇博客:https://www.cnblogs.com/jinghao/archive/2012/06/16/2552093.html
--extra-cflags=-I/xxxx/include
第三方库不在默认的include路径,则需要指定--extra-cflags=-I/xxxx/include
--extra-ldflags=-L/usr/local/x264-x86/lib
如下指定多个:
./configure --prefix=/usr/local/ffmpeg --enable-libmp3lame --enable-libvorbis --enable-shared --extra-cflags="-I/usr/local/lame/include -I/usr/local/libvorbis/include -I/usr/local/libogg/include" --extra-ldflags="-L/usr/local/lame/lib -L/usr/local/libvorbis/lib -L/usr/local/libogg/lib"
extra-cflags的额外用法:比如--extra-cflags=-Dxxx,-D的意思是宏,指的就是在编译的时候预定义了xxx这样的宏
在https://blog.youkuaiyun.com/chengqiang7781/article/details/100910445又看到“--extra-ldflags中的 -static-libgcc配置去除libgcc_s_dw2-1.dll的依赖”,这一句是什么意思呢?
关于--toolchain=msvc这个选项(貌似使用这个选项后会产生pdb文件,可调式,我也不确定),参考https://zhuanlan.zhihu.com/p/25422937
大意就是使用msvc的工具链进行编译(我的理解是Visual Studio?),在早期别人编译FFmpeg的博客中可以发现还要改link.exe什么的,现在新的版本的FFmpeg加上这个编译选项就行啦