./configure --enable-avfilter --enable-filter=movie --enable-gpl --enable-postproc \
    --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis \
    --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac \
    --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --enable-nonfree \
    --enable-shared --enable-pthreads --disable-indevs --cc=/usr/bin/gcc-4.2 --arch=x86_64

给出一个错误:



但是locate faac
/opt/local/bin/faac
/opt/local/include/faac.h
/opt/local/include/faaccfg.h
/opt/local/lib/libfaac.0.dylib
/opt/local/lib/libfaac.a
/opt/local/lib/libfaac.dylib

我知道如何告诉配置脚本如何找到libfaac吗?

最佳答案

配置生成工具生成的典型configure脚本将利用环境变量CPPFLAGS和LDFLAGS。您需要同时使用两者。

将CPPFLAGS设置为-I/opt/local/include,以便找到头文件,将LDFLAGS设置为-L/opt/local/lib,以便链接器找到该库。

除了特定于您所使用的shell的“环境变量”解决方案之外,始终在configure中设置这些变量的一种方法是使用以下命令启动后者:

./configure CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib

关于macos - 在OSX上构建ffmpeg,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4119359/

10-11 22:27
查看更多