【发布时间】:2011-09-23 07:41:44
【问题描述】:
我正在从源代码在 Snow Leopard 上编译 ffmpeg。使用 Macport 不是一个选项,因为我在 ffmpeg 中有一些自定义修改。 make 命令是:
$ ./configure --enable-gpl --enable-libmp3lame --enable-static \
--disable-shared --enable-libx264 --enable-pthreads \
--disable-doc --enable-avfilter
$ make
错误:
CC ffplay.o
ffplay.c: In function ‘SDL_main’:
ffplay.c:3157: warning: assignment discards qualifiers from pointer target type
LD ffplay_g
Undefined symbols for architecture x86_64:
"_x264_encoder_open_112", referenced from:
_X264_init in libavcodec.a(libx264.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [ffplay_g] Error 1
我已经从源代码编译了 libx264,一切正常。
$ cd x264-snapshot-20101228-2245; ./configure && make && sudo make install
...它包含符号“_x264_encoder_open_112”
$ nm ./libx264.a | grep _x264_encoder_open_112
0000000000003ef0 T _x264_encoder_open_112
000000000000d7b0 S _x264_encoder_open_112.eh
可能出了什么问题?
【问题讨论】:
-
你解决过这个问题吗?我有完全相同的问题...
-
@beardedd 我没有准确的答案,但我必须继续重建库。我猜是macport有冲突。因此,您可能希望暂时删除这些库以强制 gcc 从
/usr而不是/opt中选择 x264.a。随时通知我们!
标签: gcc ffmpeg ld undefined-symbol