linux - C++ Ubuntu. Multiple undefined references compiling with FFMPEG libs -
i installed ffmpeg libraries on ubuntu 12.10 , headers described here .
in c++ application uses ffmpeg when compiling (gcc) getting :
/usr/local/lib/libavcodec.a(libfaac.o): in function
faac_encode_frame': /root/ffmpeg/libavcodec/libfaac.c:179: undefined reference to
faacencencode' /usr/local/lib/libavcodec.a(libfaac.o): in functionfaac_encode_close': /root/ffmpeg/libavcodec/libfaac.c:52: undefined reference to
faacencclose' /usr/local/lib/libavcodec.a(libfaac.o): in functionfaac_encode_init': /root/ffmpeg/libavcodec/libfaac.c:78: undefined reference to
faacencopen' /root/ffmpeg/libavcodec/libfaac.c:88: undefined referencefaacencgetcurrentconfiguration' /root/ffmpeg/libavcodec/libfaac.c:139: undefined reference
faacencgetdecoderspecificinfo' /root/ffmpeg/libavcodec/libfaac.c:153: undefined referencefaacencsetconfiguration' /usr/local/lib/libavcodec.a(libfdk-aacenc.o): in function
aac_encode_close': /root/ffmpeg/libavcodec/libfdk-aacenc.c:99: undefined referenceaacencclose' /usr/local/lib/libavcodec.a(libfdk-aacenc.o): in function
aac_encode_frame': /root/ffmpeg/libavcodec/libfdk-aacenc.c:344: undefined referenceaacencencode' /usr/local/lib/libavcodec.a(libfdk-aacenc.o): in function
aac_encode_init': /root/ffmpeg/libavcodec/libfdk-aacenc.c:116: undefined referenceaacencopen' /root/ffmpeg/libavcodec/libfdk-aacenc.c:125: undefined reference
aacencoder_setparam' /root/ffmpeg/libavcodec/libfdk-aacenc.c:132: undefined referenceaacencoder_setparam' /root/ffmpeg/libavcodec/libfdk-aacenc.c:140: undefined reference
aacencoder_setparam' /root/ffmpeg/libavcodec/libfdk-aacenc.c:160: undefined referenceaacencoder_setparam' /root/ffmpeg/libavcodec/libfdk-aacenc.c:167: undefined reference
aacencoder_setparam' /usr/local/lib/libavcodec.a(libfdk-aacenc.o):/root/ffmpeg/libavcodec/libfdk-aacenc.c:185: more undefined referencesaacencoder_setparam' follow /usr/local/lib/libavcodec.a(libfdk-aacenc.o): in function
aac_encode_init': /root/ffmpeg/libavcodec/libfdk-aacenc.c:263: undefined referenceaacencencode' /root/ffmpeg/libavcodec/libfdk-aacenc.c:269: undefined reference
aacencinfo' /usr/local/lib/libavcodec.a(libmp3lame.o): in functionmp3lame_encode_frame': /root/ffmpeg/libavcodec/libmp3lame.c:204: undefined reference to
lame_encode_buffer_float' /root/ffmpeg/libavcodec/libmp3lame.c:188: undefined referencelame_encode_buffer' /root/ffmpeg/libavcodec/libmp3lame.c:191: undefined reference to
lame_encode_buffer_int' /root/ffmpeg/libavcodec/libmp3lame.c:210: undefined referencelame_encode_flush' /usr/local/lib/libavcodec.a(libmp3lame.o): in function
mp3lame_encode_close': /root/ffmpeg/libavcodec/libmp3lame.c:88: undefined referencelame_close' /usr/local/lib/libavcodec.a(libmp3lame.o): in function
mp3lame_encode_init': /root/ffmpeg/libavcodec/libmp3lame.c:100: undefined referencelame_init' /root/ffmpeg/libavcodec/libmp3lame.c:104: undefined reference
lame_set_num_channels' /root/ffmpeg/libavcodec/libmp3lame.c:105: undefined referencelame_set_mode' /root/ffmpeg/libavcodec/libmp3lame.c:108: undefined reference
lame_set_in_samplerate' /root/ffmpeg/libavcodec/libmp3lame.c:109: undefined referencelame_set_out_samplerate' /root/ffmpeg/libavcodec/libmp3lame.c:113: undefined reference
lame_set_quality' /root/ffmpeg/libavcodec/libmp3lame.c:115: undefined referencelame_set_quality' /root/ffmpeg/libavcodec/libmp3lame.c:119: undefined reference
lame_set_vbr' /root/ffmpeg/libavcodec/libmp3lame.c:120: undefined referencelame_set_vbr_quality' /root/ffmpeg/libavcodec/libmp3lame.c:123: undefined reference
lame_set_brate' /root/ffmpeg/libavcodec/libmp3lame.c:127: undefined referencelame_set_bwritevbrtag' /root/ffmpeg/libavcodec/libmp3lame.c:130: undefined reference
lame_set_disable_reservoir' /root/ffmpeg/libavcodec/libmp3lame.c:133: undefined referencelame_init_params' /root/ffmpeg/libavcodec/libmp3lame.c:139: undefined reference
lame_get_encoder_delay' /root/ffmpeg/libavcodec/libmp3lame.c:142: undefined referencelame_get_framesize' /usr/local/lib/libavcodec.a(libopencore-amr.o): in function
amr_wb_decode_close': /root/ffmpeg/libavcodec/libopencore-amr.c:363: undefined referenced_if_exit' /usr/local/lib/libavcodec.a(libopencore-amr.o): in function
amr_nb_decode_frame': /root/ffmpeg/libavcodec/libopencore-amr.c:122: undefined referencedecoder_interface_decode' /usr/local/lib/libavcodec.a(libopencore-amr.o): in function
amr_wb_decode_frame': /root/ffmpeg/libavcodec/libopencore-amr.c:352: undefined referenced_if_decode' /usr/local/lib/libavcodec.a(libopencore-amr.o): in function
amr_nb_encode_frame': /root/ffmpeg/libavcodec/libopencore-amr.c:267: undefined referenceencoder_interface_encode' /usr/local/lib/libavcodec.a(libopencore-amr.o): in function
amr_wb_decode_init': /root/ffmpeg/libavcodec/libopencore-amr.c:318: undefined referenced_if_init' /usr/local/lib/libavcodec.a(libopencore-amr.o): in function
amr_nb_encode_close': /root/ffmpeg/libavcodec/libopencore-amr.c:222: undefined referenceencoder_interface_exit' /usr/local/lib/libavcodec.a(libopencore-amr.o): in function
amr_nb_decode_close': /root/ffmpeg/libavcodec/libopencore-amr.c:86: undefined referencedecoder_interface_exit' /usr/local/lib/libavcodec.a(libopencore-amr.o): in function
amr_nb_encode_init': /root/ffmpeg/libavcodec/libopencore-amr.c:205: undefined referenceencoder_interface_init' /usr/local/lib/libavcodec.a(libopencore-amr.o): in function
amr_nb_decode_init': /root/ffmpeg/libavcodec/libopencore-amr.c:73: undefined referencedecoder_interface_init' /usr/local/lib/libavcodec.a(libspeexdec.o): in function
libspeex_decode_frame': /root/ffmpeg/libavcodec/libspeexdec.c:139: undefined referencespeex_bits_remaining' /root/ffmpeg/libavcodec/libspeexdec.c:147: undefined reference
speex_bits_read_from' /root/ffmpeg/libavcodec/libspeexdec.c:152: undefined referencespeex_decode_int' /root/ffmpeg/libavcodec/libspeexdec.c:140: undefined reference
speex_bits_peek_unsigned' /root/ffmpeg/libavcodec/libspeexdec.c:158: undefined referencespeex_decode_stereo_int' /usr/local/lib/libavcodec.a(libspeexdec.o): in function
libspeex_decode_close': /root/ffmpeg/libavcodec/libspeexdec.c:169: undefined referencespeex_bits_destroy' /root/ffmpeg/libavcodec/libspeexdec.c:170: undefined reference
speex_decoder_destroy' /usr/local/lib/libavcodec.a(libspeexdec.o): in functionlibspeex_decode_init': /root/ffmpeg/libavcodec/libspeexdec.c:48: undefined reference
speex_packet_to_header' /root/ffmpeg/libavcodec/libspeexdec.c:67: undefined referencespeex_header_free' /root/ffmpeg/libavcodec/libspeexdec.c:82: undefined reference
speex_lib_get_mode' /root/ffmpeg/libavcodec/libspeexdec.c:100: undefined referencespeex_bits_init' /root/ffmpeg/libavcodec/libspeexdec.c:101: undefined reference
speex_decoder_init' /root/ffmpeg/libavcodec/libspeexdec.c:110: undefined referencespeex_std_stereo_request_handler' /root/ffmpeg/libavcodec/libspeexdec.c:113: undefined reference
speex_decoder_ctl' /root/ffmpeg/libavcodec/libspeexdec.c:43: undefined reference `speex_nb_mode'
and more ....
when compile link against these libs:
-lfaac -lavformat -lavcodec -lavutil -lavfilter -lswscale
what problem ?
i managed compile.for interested:
first disabled modules (which don't use) :
./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 linked rest of dependencies in order:
-lavformat -lavcodec -lfaac -lmp3lame -lfdk-aac -lvpx -lx264 -lavdevice -lyasm -lavutil -lswscale -lrtmp -lvorbisenc -lva
Comments
Post a Comment