0

我在 Ubuntu 12.10 和头文件上安装了 FFMPEG 库,如此处所述

在我编译(gcc)时使用FFMPEG的C++应用程序中,我得到了这个:

/usr/local/lib/libavcodec.a(libfaac.o): 在函数 Faac_encode_frame': /root/ffmpeg/libavcodec/libfaac.c:179: undefined reference tofaacEncEncode' /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: 未定义引用 faacEncGetDecoderSpecificInfo'/root/ffmpeg/libavcodec/ faacEncGetCurrentConfiguration' /root/ffmpeg/libavcodec/libfaac.c:139: undefined reference to 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_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' /root/ffmpeg/libavcodec/libmp3lame.c:188:未定义对 lame_encode_buffer' /root/ffmpeg/libavcodec/libmp3lame.c:191: undefined reference tolame_encode_buffer_int'的引用'/root/ffmpeg/libavcodec/libmp3lame.c:210:未定义对 lame_encode_flush' /usr/local/lib/libavcodec.a(libmp3lame.o): In functionmp3lame_encode_close'的引用:/root/ffmpeg/libavcodec/libmp3lame.c: 88:未定义的引用 lame_close' /usr/local/lib/libavcodec.a(libmp3lame.o): In function mp3lame_encode_init':/root/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_in_samplerate'/root/ lame_set_mode' /root/ffmpeg/libavcodec/libmp3lame.c:108: undefined reference to 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:115: 未定义引用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_reservoir' /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:未定义对amr_wb_decode_frame'的引用Decoder_Interface_Decode' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function :/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:对 amr_nb_encode_init 的未定义引用Decoder_Interface_exit' /usr/local/lib/libavcodec.a(libopencore-amr.o): In function : /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 Decoder_Interface_init' /usr/local/lib/libavcodec.a(libspeexdec.o): In function -amr.c:73:未定义引用 libspeex_decode_frame':/root/ffmpeg/libavcodec/libspeexdec.c:139:未定义引用speex_bits_remaining' /root/ffmpeg/libavcodec/libspeexdec.c:147: undefined reference to speex_bits_read_from'/root/ffmpeg/libavcodec/libspeexdec .c:152: 对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):在函数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'

和更多 ....

当我编译时,我链接到这些库:

-lfaac -lavformat -lavcodec -lavutil -lavfilter -lswscale

问题是什么 ?

4

1 回答 1

2

我设法编译。对于那些感兴趣的人:

首先,我禁用了一些模块(我并没有真正使用):

./configure --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame \ --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libspeex --enable -librtmp --disable-libtheora \ --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3

Then I linked the rest of dependencies in this order:

-lavformat -lavcodec -lfaac -lmp3lame -lfdk-aac -lvpx -lx264 -lavdevice -lyasm -lavutil -lswscale -lrtmp -lvorbisenc -lva

于 2013-05-19T13:37:08.800 回答