我正在尝试在 Mac 上的 Xcode 中使用 ffmpeg 库。我想针对像 Lion 和 Mountain Lion 这样的 64 位系统。我试图编译
./configure --enable-static --enable-nonfree --enable-version3 --enable-gpl --disable-doc --disable-programs --arch=x86_64 --cc=cc --disable-yasm --host-cflags="-arch x86_64" --host-ldflags="-arch x86_64" --prefix=ffmpeg
然后我将 ffmpeg 目录(带有 lib 和 include 文件夹)复制到我的项目文件夹中。我将 .a 文件添加到我的项目中,并将 .a 文件添加到“使用库链接二进制文件”)。我还调整了项目设置中的标题和库文件夹。到目前为止,一切都很好。
我是这些库的初学者,所以我从打开视频开始。工作正常。
现在我正在尝试解码给定的输入文件。因此我查看了这个示例文件: http: //ffmpeg.org/doxygen/1.0/decoding__encoding_8c-source.html
我复制了 video_decode_example 函数。但是在编译时出现以下错误:
Undefined symbols for architecture x86_64:
"_decode_write_frame", referenced from:
_video_decode_example in cutClass.o
ld: symbol(s) not found for architecture x86_64
我在编译ffmpeg时做错了什么?