Closed. This question is off-topic. It is not currently accepting answers. Learn more
想改进这个问题吗?Update the question所以堆栈溢出的值小于aa>。
6年前关闭。
我在Ubuntu12.10上安装了FFMPEG库和头文件。
在我的C++应用程序中,当我编译时使用FFMPEG(GCC),我得到这个:
/usr/local/lib/libavcodec.a(libfaac.o):函数中
Faac_encode_frame': /root/ffmpeg/libavcodec/libfaac.c:179: undefined reference tofaacencode'/usr/local/lib/libavcodec.a(libfaac.o):
功能Faac_encode_close': /root/ffmpeg/libavcodec/libfaac.c:52: undefined reference tofaacEncClose'
/usr/local/lib/libavcodec.a(libfaac.o):函数中
Faac_encode_init': /root/ffmpeg/libavcodec/libfaac.c:78: undefined reference tofaacEncOpen'/root/ffmpeg/libavcodec/libfaac.c:88:
未定义对faacEncGetCurrentConfiguration' /root/ffmpeg/libavcodec/libfaac.c:139: undefined reference to faacencgetdecodersspecificinfo'/root/ffmpeg/libavcodec/libfaac的引用。c:153:
未定义对faacEncSetConfiguration' /usr/local/lib/libavcodec.a(libfdk-aacenc.o): In function aac_encode_close':root/ffmpeg/libavcodec/libfdk aacenc.c:99的引用:
未定义对aacEncClose' /usr/local/lib/libavcodec.a(libfdk-aacenc.o): In function aac_encode_frame':root/ffmpeg/libavcodec/libfdk aacenc.c:344的引用:
未定义对aacEncEncode' /usr/local/lib/libavcodec.a(libfdk-aacenc.o): In function aac_encode_init':root/ffmpeg/libavcodec/libfdk aacenc的引用。c:116:
未定义对aacEncOpen' /root/ffmpeg/libavcodec/libfdk-aacenc.c:125: undefined reference to aacEncoder_SetParam'/root/ffmpeg/libavcodec/libfdk aacenc.c:132的引用:
未定义对aacEncoder_SetParam' /root/ffmpeg/libavcodec/libfdk-aacenc.c:140: undefined reference to aacEncoder_SetParam'/root/ffmpeg/libavcodec/libfdk aacenc.c:160的引用:
未定义对aacEncoder_SetParam' /root/ffmpeg/libavcodec/libfdk-aacenc.c:167: undefined reference to aacEncoder\u SetParam'的引用
/usr/local/lib/libavcodec.a(libfdk aacenc.o):/root/ffmpeg/libavcodec/libfdk aacenc.c:185:
aacEncoder_SetParam' follow /usr/local/lib/libavcodec.a(libfdk-aacenc.o): In function aac_encode_init':root/ffmpeg/libavcodec/libfdk aacenc.c:263的更多未定义引用:
函数中对aacEncEncode' /root/ffmpeg/libavcodec/libfdk-aacenc.c:269: undefined reference to aacEncInfo'/usr/local/lib/libavcodec.a(libmp3lame.o)的未定义引用
mp3lame_encode_frame': /root/ffmpeg/libavcodec/libmp3lame.c:204: undefined reference tolame_encode_buffer_float(lame_编码缓冲区浮动)
/根目录/ffmpeg/libavcodec/libmp3lame.c:188:未定义对
lame_encode_buffer' /root/ffmpeg/libavcodec/libmp3lame.c:191: undefined reference to跛行编码缓冲区
/根目录/ffmpeg/libavcodec/libmp3lame.c:210:未定义对
lame_encode_flush' /usr/local/lib/libavcodec.a(libmp3lame.o): In functionmp3lame_encode_close':
/根目录/ffmpeg/libavcodec/libmp3lame.c:88:未定义对
lame_close' /usr/local/lib/libavcodec.a(libmp3lame.o): In function mp3lame_encode_init':根/ffmpeg/libavcodec/libmp3lame.c:100:
未定义对lame_init' /root/ffmpeg/libavcodec/libmp3lame.c:104: undefined reference to lame_set_num_channels'/root/ffmpeg/libavcodec/libmp3lame的引用。c:105:
未定义对lame_set_mode' /root/ffmpeg/libavcodec/libmp3lame.c:108: undefined reference to lame_set_in_samplerate'/root/ffmpeg/libavcodec/libmp3lame的引用。c:109:
未定义对lame_set_out_samplerate' /root/ffmpeg/libavcodec/libmp3lame.c:113: undefined reference to lame_set_quality'/root/ffmpeg/libavcodec/libmp3lame.c的引用:未定义
参考lame_set_quality' /root/ffmpeg/libavcodec/libmp3lame.c:119: undefined reference to lame_set_VBR'/root/ffmpeg/libavcodec/libmp3lame.c:120:未定义
参考lame_set_VBR_quality' /root/ffmpeg/libavcodec/libmp3lame.c:123: undefined reference to lame_set_brate'/root/ffmpeg/libavcodec/libmp3lame.c:127:未定义
参考lame_set_bWriteVbrTag' /root/ffmpeg/libavcodec/libmp3lame.c:130: undefined reference to lame_set_disable_reservator'/root/ffmpeg/libavcodec/libmp3lame.c:133:
未定义对lame_init_params' /root/ffmpeg/libavcodec/libmp3lame.c:139: undefined reference to lame_get_encoder_delay'/root/ffmpeg/libavcodec/libmp3lame的引用。c:142:
未定义对lame_get_framesize' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function amr_wb_decode_close':root/ffmpeg/libavcodec/libopencore amr.c:363的引用:
未定义对D_IF_exit' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function amr_nb_decode_frame':root/ffmpeg/libavcodec/libopencore amr.c:122的引用:
未定义对Decoder_Interface_Decode' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function amr_wb_decode_frame':root/ffmpeg/libavcodec/libopencore amr.c:352的引用:
未定义对D_IF_decode' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function amr_nb_encode_frame':root/ffmpeg/libavcodec/libopencore amr.c:267的引用:
未定义对Encoder_Interface_Encode' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function amr_wb_decode_init':root/ffmpeg/libavcodec/libopencore amr.c:318的引用:
未定义对D_IF_init' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function amr_nb_encode_close':root/ffmpeg/libavcodec/libopencore amr.c:222的引用:
未定义对Encoder_Interface_exit' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function amr_nb_decode_close':root/ffmpeg/libavcodec/libopencore amr的引用。c:86:
未定义对Decoder_Interface_exit' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function amr_nb_encode_init':root/ffmpeg/libavcodec/libopencore amr.c:205的引用:
未定义对Encoder_Interface_init' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function amr_nb_decode_init':root/ffmpeg/libavcodec/libopencore amr的引用。c:73:
未定义对Decoder_Interface_init' /usr/local/lib/libavcodec.a(libspeexdec.o): In function libspeex_decode_frame':root/ffmpeg/libavcodec/libspeexdec.c:139的引用:
未定义对从“/root/ffmpeg/libavcodec/libspeexdec.c:152读取的speex_bits_remaining' /root/ffmpeg/libavcodec/libspeexdec.c:147: undefined reference to speex位的引用:
未定义对speex_decode_int' /root/ffmpeg/libavcodec/libspeexdec.c:140: undefined reference to speex_bits_peek_unsigned'/root/ffmpeg/libavcodec/libspeexdec.c的引用:158:
未定义对speex_decode_stereo_int' /usr/local/lib/libavcodec.a(libspeexdec.o): In function libspeex_decode_close':root/ffmpeg/libavcodec/libspeexdec.c:169的引用:
speex_bits_destroy' /root/ffmpeg/libavcodec/libspeexdec.c:170: undefined reference to speex_decoder_destroy'/usr/local/lib/libavcodec.a(libspeexdec.o)的未定义引用:In
函数libspeex_decode_init': /root/ffmpeg/libavcodec/libspeexdec.c:48: undefined reference to speex_packet_to_header'/root/ffmpeg/libavcodec/libspeexdec.c:67:
未定义对speex_header_free' /root/ffmpeg/libavcodec/libspeexdec.c:82: undefined reference to speex-lib_-get_-mode'/root/ffmpeg/libavcodec/libspeexdec.c:100的引用:
未定义对speex_bits_init' /root/ffmpeg/libavcodec/libspeexdec.c:101: undefined reference to speex_decoder_init'/root/ffmpeg/libavcodec/libspeexdec.c:110的引用:
未定义对speex_std_stereo_request_handler' /root/ffmpeg/libavcodec/libspeexdec.c:113: undefined reference to speex_decoder_ctl'/root/ffmpeg/libavcodec/libspeexdec.c的引用:43:
未定义对“speex_nb_mode”的引用
还有更多。。。。
编译时,我会链接到这些lib:
-lfaac-lavformat-lavcodec-lavutil-lavfilter-lswscale
怎么了?

最佳答案

我设法编译了。对于那些感兴趣的人:
首先,我禁用了一些模块(我并不真正使用这些模块):
./configure--enable gpl--enable libass--enable libfaac--enable libfdk aac--enable-libmp3lame\
--禁用libopencore amrnb--禁用libopencore amrwb--禁用libspeex--启用librtmp--禁用libtheora\
--enable libvorbis—enable libvpx—enable-x11grab—enable-libx264—enable nonfree—enable-version3
然后我按以下顺序链接其余依赖项:
-lavformat-lavcodec-lfaac-lmp3 lame-lfdk aac-lvpx-lx264-lavdevice-lyasm-lavutil-lswscale-lrtmp-lvorbisenc-lva

10-08 03:19