I'm trying to integrate ffmpeg and QT 4.5.2 together - just testing. Running into problems. Here it is, plain and simple:

Even though I'm linking against -lavcodec -lavformat -lswscale -lavutil, I'm still getting a bunch of undefined reference errors for avcoded_* stuff and av_free and sws_getContext, etc. See below. Any bloody ideas?? I've been googling and banging my head against this for hours! Any ideas? Thanks in advance for any help.

g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.2/lib -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.2/lib -o QT_ffmpeg_video .obj/release-shared/playmessage.o .obj/release-shared/VideoThread.o .obj/release-shared/VideoWidget.o .obj/release-shared/main.o .obj/release-shared/moc_playmessage.o .obj/release-shared/moc_VideoThread.o .obj/release-shared/moc_VideoWidget.o -L/opt/qtsdk/qt/lib -lavcodec -lavformat -lswscale -lavutil -lQtGui -L/opt/qtsdk/qt/lib -L/usr/X11R6/lib -pthread -lpng -lfreetype -lgobject-2.0 -lSM -lICE -pthread -pthread -lXrender -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -lpthread -ldl
.obj/release-shared/VideoThread.o: In function `VideoThread::playVideo()':
/opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:53: undefined reference to `av_register_all()' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:56: undefined reference to `av_open_input_file(AVFormatContext**, char const*, AVInputFormat*, int, AVFormatParameters*)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:60: undefined reference to `av_find_stream_info(AVFormatContext*)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:64: undefined reference to `dump_format(AVFormatContext*, int, char const*, int)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:81: undefined reference to `avcodec_find_decoder(CodecID)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:86: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:95: undefined reference to `avcodec_alloc_frame()' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:98: undefined reference to `avcodec_alloc_frame()' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:107: undefined reference to `avpicture_get_size(PixelFormat, int, int)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:113: undefined reference to `avpicture_get_size(PixelFormat, int, int)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:121: undefined reference to `avpicture_fill(AVPicture*, unsigned char*, PixelFormat, int, int)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:127: undefined reference to `sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double const*)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:154: undefined reference to `av_free_packet(AVPacket*)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:131: undefined reference to `av_read_frame(AVFormatContext*, AVPacket*)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:138: undefined reference to `avcodec_decode_video(AVCodecContext*, AVFrame*, int*, unsigned char const*, int)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:145: undefined reference to `sws_scale(SwsContext*, unsigned char**, int*, int, int, unsigned char**, int*)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:159: undefined reference to `av_free(void*)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:162: undefined reference to `av_free(void*)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:165: undefined reference to `avcodec_close(AVCodecContext*)' /opt/qtsdk/qt/examples/QT_ffmpeg_video/VideoThread.cpp:168: undefined reference to `av_close_input_file(AVFormatContext*)'
collect2: ld returned 1 exit status
make: *** [QT_ffmpeg_video] Error 1


Regards,
-josiah

-=-=-=-=-=-=-=-=-=-=-=-=-
Josiah Bryan
Productive Concepts, Inc.
[email protected]
(765) 964-6009, ext. 224

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to