[FFmpeg-user] undefined symbols when linking with ffmpeg code

Zahira Ammarguellat zammargu at marvell.com
Wed Apr 11 21:03:47 CEST 2012


Hello,

I am calling the ffmpeg functionalities from some C++ application. It is compiling but I am getting some undefined references at link time.

/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:365: undefined reference to `av_malloc(unsigned int)'
client/sinks/ffplay/MarvellFfplay.o: In function `packet_queue_flush':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:403: undefined reference to `av_freep(void*)'
client/sinks/ffplay/MarvellFfplay.o: In function `packet_queue_get':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:449: undefined reference to `av_free(void*)'
client/sinks/ffplay/MarvellFfplay.o: In function `video_audio_display':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:884: undefined reference to `av_free(void*)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:887: undefined reference to `av_malloc(unsigned int)'
client/sinks/ffplay/MarvellFfplay.o: In function `stream_close':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:960: undefined reference to `av_free(void*)'
client/sinks/ffplay/MarvellFfplay.o: In function `do_exit':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:987: undefined reference to `av_log(void*, int, char const*, ...)'
client/sinks/ffplay/MarvellFfplay.o: In function `do_snapshot':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1517: undefined reference to `av_malloc(unsigned int)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1532: undefined reference to `av_free(void*)'
client/sinks/ffplay/MarvellFfplay.o: In function `input_get_buffer':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1621: undefined reference to `av_log(void*, int, char const*, ...)'
client/sinks/ffplay/MarvellFfplay.o: In function `input_reget_buffer':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1697: undefined reference to `av_log(void*, int, char const*, ...)'
client/sinks/ffplay/MarvellFfplay.o: In function `input_init':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1719: undefined reference to `av_log(void*, int, char const*, ...)'
client/sinks/ffplay/MarvellFfplay.o: In function `input_uninit':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1734: undefined reference to `av_free(void*)'
client/sinks/ffplay/MarvellFfplay.o: In function `configure_video_filters':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1845: undefined reference to `av_strdup(char const*)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1859: undefined reference to `av_strdup(char const*)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1864: undefined reference to `av_strdup(char const*)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1872: undefined reference to `av_freep(void*)'
client/sinks/ffplay/MarvellFfplay.o: In function `video_thread':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1923: undefined reference to `av_rescale_q(long long, AVRational, AVRational)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:1955: undefined reference to `av_free(void*)'
client/sinks/ffplay/MarvellFfplay.o: In function `audio_decode_frame':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2150: undefined reference to `av_audio_convert_free(AVAudioConvert*)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2152: undefined reference to `av_audio_convert_alloc(AVSampleFormat, int, AVSampleFormat, int, float const*, int)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2171: undefined reference to `av_audio_convert(AVAudioConvert*, void* const*, int const*, void const* const*, int const*, int)'
client/sinks/ffplay/MarvellFfplay.o: In function `stream_component_close':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2385: undefined reference to `av_audio_convert_free(AVAudioConvert*)'
client/sinks/ffplay/MarvellFfplay.o: In function `read_thread':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2468: undefined reference to `avio_set_interrupt_cb(int (*)())'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2650: undefined reference to `url_feof(AVIOContext*)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2694: undefined reference to `avio_set_interrupt_cb(int (*)())'
client/sinks/ffplay/MarvellFfplay.o: In function `stream_open':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2709: undefined reference to `av_mallocz(unsigned int)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2728: undefined reference to `av_free(void*)'
client/sinks/ffplay/MarvellFfplay.o: In function `marvell_ffplay(void*)':
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2950: undefined reference to `av_log_set_flags(int)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/client/sinks/ffplay/MarvellFfplay.cpp:2960: undefined reference to `av_register_protocol2(URLProtocol*, int)'
/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavformat//libavformat.a(oggparsedirac.o): In function `dirac_header':
/zammargu/Libraries/ffmpeg_Marvell_qnx/libavformat/oggparsedirac.c:39: undefined reference to `ff_dirac_parse_sequence_header'

This is the link command I am using:
arm-unknown-nto-qnx6.5.0-g++ -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../live555_QNX/UsageEnvironment/include -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../live555_QNX/groupsock/include -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../live555_QNX/liveMedia/include -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../live555_QNX/BasicUsageEnvironment/include -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../live555_QNX/testProgs -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavutil -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavformat -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavcodec -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libswscale -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavdevice -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavfilter -I/zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libpostproc -I /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../dbus-1.4.16_qnx/build/include/dbus-1.0 -I /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../dbus-1.4.16_qnx/build/lib/dbus-1.0/include  -I /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../SDL-1.2.13_qnx/build/include -g -Wall -I /opt/qnx650/target/qnx6/usr/include   -c -o common/i2c/I2CMessageReceiver.o common/i2c/I2CMessageReceiver.cpp
arm-unknown-nto-qnx6.5.0-g++ -o MarvellWFDClient client/MarvellRTSPClient.o client/MarvellClientMediaSession.o client/ClientConfiguration.o client/MarvellClientMediaSubsession.o client/MPEG2TransportStreamDemux.o  client/states/ClientState.o client/states/CapabilityNegotiationClientState.o client/states/ErrorClientState.o client/states/SessionEstablishmentClientState.o client/states/PlayClientState.o client/states/StoppedClientState.o client/states/StandbyClientState.o client/hdcp/Receiver.o client/hdcp/ReceiverManager.o client/sinks/ProgramPipeSink.o client/sinks/NamedPipeSink.o client/sinks/BufferedNamedPipeSink.o client/sinks/ProgramMemBufSink.o client/sinks/GstFfplaySink.o client/sinks/ffplay/MarvellFfplay.o client/sinks/ffplay/membuf_protocol.o client/sinks/ffplay/cmdutils.o client/sinks/ffplay/packet_ringbuf_ts.o client/dbus/ClientDBus.o client/dbus/dbus-introspect.o client/uibc/MarvellUibcClient.o client/i2c/MarvellI2CServer.o client/i2c/MarvellI2CCommunication.o getopt_long.o client/wfd_client.o common/utils.o common/MessageTypes.o common/State.o common/HDCPUtils.o common/buffers/ringbuf.o common/buffers/ringbuf_ts.o common/rtsp_messages/RTSPMessage.o common/rtsp_messages/h264Codec.o common/rtsp_messages/RTSPMessageUtils.o common/rtsp_messages/MessageWFDAudioFormats.o common/rtsp_messages/MessageWFDVideoFormats.o common/rtsp_messages/MessageWFD3DFormats.o common/rtsp_messages/MessageWFDContentProtection.o common/rtsp_messages/MessageWFDCoupledSink.o common/rtsp_messages/MessageWFDDisplayEdid.o common/rtsp_messages/MessageWFDTriggerMethod.o common/rtsp_messages/MessageWFDURLPresentation.o common/rtsp_messages/MessageWFDClientRTPPorts.o common/rtsp_messages/MessageWFDRoute.o common/rtsp_messages/MessageWFDI2C.o common/rtsp_messages/MessageWFDSetCEC.o common/rtsp_messages/MessageWFDGetCEC.o common/rtsp_messages/resolutions.o common/rtsp_messages/audio_modes.o common/rtsp_messages/MessageWFDIDRRequest.o common/rtsp_messages/MessageWFDStandby.o common/rtsp_messages/MessageWFDResume.o common/rtsp_messages/MessageWFDPreferredDisplayMode.o common/rtsp_messages/MessageWFDUIBCSetting.o common/rtsp_messages/input_category_val.o common/rtsp_messages/generic_capability_val.o common/rtsp_messages/hidc_capability_val.o common/rtsp_messages/MessageWFDUIBCCapability.o common/rtsp_messages/MessageWFDAVFormatChangeTiming.o common/rtsp_messages/MessageWFDStandbyResumeCapability.o common/rtsp_messages/MessageWFDConnectorType.o common/uibc/MarvellUibcError.o common/uibc/MarvellUibcMessage.o common/uibc/events/MarvellUibcEvent.o common/uibc/events/MarvellUibcMouseEvent.o common/uibc/events/MarvellUibcKeyEvent.o common/uibc/events/MarvellUibcZoomEvent.o common/uibc/events/MarvellUibcScrollEvent.o common/uibc/events/MarvellUibcRotationEvent.o common/i2c/MarvellI2CMessage.o common/i2c/MarvellI2CRdReplyAckMessage.o common/i2c/MarvellI2CRdReqMessage.o common/i2c/MarvellI2CReplyMessage.o common/i2c/MarvellI2CWrReqMessage.o common/i2c/MarvellI2CWriteTransacton.o common/i2c/I2CMessageReceiver.o -Wl -lssl -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../SDL-1.2.13_qnx/build/lib/ -lSDL -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../live555_QNX/liveMedia/ -l liveMedia -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../live555_QNX/groupsock/ -l groupsock -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../live555_QNX/BasicUsageEnvironment/ -l BasicUsageEnvironment -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../live555_QNX/UsageEnvironment/ -l UsageEnvironment -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../dbus-1.4.16_qnx/build/lib/ -l dbus-1 -Wl -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libpostproc/ -l postproc -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libswscale/ -l swscale -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavfilter/ -l avfilter -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavdevice/ -l avdevice -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavcodec/ -l avcodec -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavformat/ -l avformat -L /zammargu/WIFI_Display/Ref_Code_QNX/snapshot-v1.6/marvell_wifi/../ffmpeg_Marvell_qnx/libavutil/ -l avutil -lz -lbz2  -lfaac -lm  -lasound -dl -lph

Any suggestions would be appreciated?
Thanks,
-Zahira


More information about the ffmpeg-user mailing list