If I use the command line I gave above, the final link stage command is this:
Code:
g++ -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -L/home/xbmc/ffmpeg-install/lib -L/home/xbmc/ffmpeg-install/include -o comskip comskip-mpeg2dec.o comskip-comskip.o comskip-BlackFrame.o comskip-ProcessCsv.o comskip-ProcessArInfo.o comskip-LoadSettings.o -largtable2 -lavutil
You can see that this is trying the *correct* path from what I understand ("-L/home/xbmc/ffmpeg-install/lib") - the second link directive ("-L/home/xbmc/ffmpeg-install/include") is decorative, it's just there to make damned sure the linker can find the files wherever they're likely to be under ~/ffmpeg-install, even if I know they're not in "include". Taking this out makes no difference.
I just removed the whole directory to get rid of old config files, object files, etc. - untarred the source - and tried the configure command above and then make. Same problem when linking:
Code:
xbmc@revo:~/comskip-0.91b$ make
make all-am
make[1]: Entering directory `/home/xbmc/comskip-0.91b'
g++ -DHAVE_CONFIG_H -I. -I/home/xbmc/ffmpeg-install/include -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-mpeg2dec.o -MD -MP -MF .deps/comskip-mpeg2dec.Tpo -c -o comskip-mpeg2dec.o `test -f 'mpeg2dec.cpp' || echo './'`mpeg2dec.cpp
mpeg2dec.cpp: In function ‘void {anonymous}::audio_packet_process({anonymous}::VideoState*, AVPacket*)’:
mpeg2dec.cpp:578:18: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mpeg2dec.cpp:579:75: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mv -f .deps/comskip-mpeg2dec.Tpo .deps/comskip-mpeg2dec.Po
g++ -DHAVE_CONFIG_H -I. -I/home/xbmc/ffmpeg-install/include -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-comskip.o -MD -MP -MF .deps/comskip-comskip.Tpo -c -o comskip-comskip.o `test -f 'comskip.cpp' || echo './'`comskip.cpp
mv -f .deps/comskip-comskip.Tpo .deps/comskip-comskip.Po
g++ -DHAVE_CONFIG_H -I. -I/home/xbmc/ffmpeg-install/include -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-BlackFrame.o -MD -MP -MF .deps/comskip-BlackFrame.Tpo -c -o comskip-BlackFrame.o `test -f 'BlackFrame.cpp' || echo './'`BlackFrame.cpp
mv -f .deps/comskip-BlackFrame.Tpo .deps/comskip-BlackFrame.Po
g++ -DHAVE_CONFIG_H -I. -I/home/xbmc/ffmpeg-install/include -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessCsv.o -MD -MP -MF .deps/comskip-ProcessCsv.Tpo -c -o comskip-ProcessCsv.o `test -f 'ProcessCsv.cpp' || echo './'`ProcessCsv.cpp
mv -f .deps/comskip-ProcessCsv.Tpo .deps/comskip-ProcessCsv.Po
g++ -DHAVE_CONFIG_H -I. -I/home/xbmc/ffmpeg-install/include -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessArInfo.o -MD -MP -MF .deps/comskip-ProcessArInfo.Tpo -c -o comskip-ProcessArInfo.o `test -f 'ProcessArInfo.cpp' || echo './'`ProcessArInfo.cpp
mv -f .deps/comskip-ProcessArInfo.Tpo .deps/comskip-ProcessArInfo.Po
g++ -DHAVE_CONFIG_H -I. -I/home/xbmc/ffmpeg-install/include -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-LoadSettings.o -MD -MP -MF .deps/comskip-LoadSettings.Tpo -c -o comskip-LoadSettings.o `test -f 'LoadSettings.cpp' || echo './'`LoadSettings.cpp
LoadSettings.cpp: In member function ‘FILE* CS::CommercialSkipper::loadSettings(int, char**)’:
LoadSettings.cpp:397:43: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:405:46: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:422:42: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:483:45: warning: format not a string literal and no format arguments [-Wformat-security]
mv -f .deps/comskip-LoadSettings.Tpo .deps/comskip-LoadSettings.Po
g++ -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -L/home/xbmc/ffmpeg-install/lib -o comskip comskip-mpeg2dec.o comskip-comskip.o comskip-BlackFrame.o comskip-ProcessCsv.o comskip-ProcessArInfo.o comskip-LoadSettings.o -largtable2 -lavutil
comskip-mpeg2dec.o: In function `(anonymous namespace)::audio_packet_process((anonymous namespace)::VideoState*, AVPacket*)':
mpeg2dec.cpp:(.text+0x682): undefined reference to `avcodec_decode_audio3'
comskip-mpeg2dec.o: In function `decodeOnePicture(_IO_FILE*, double, CS::CommercialSkipper*)':
mpeg2dec.cpp:(.text+0x11f6): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x122a): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x12dd): undefined reference to `av_read_frame'
mpeg2dec.cpp:(.text+0x13f1): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1417): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1449): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1456): undefined reference to `av_free_packet'
comskip-mpeg2dec.o: In function `(anonymous namespace)::video_packet_process((anonymous namespace)::VideoState*, AVPacket*)':
mpeg2dec.cpp:(.text+0x1521): undefined reference to `avcodec_decode_video2'
mpeg2dec.cpp:(.text+0x15ca): undefined reference to `avcodec_get_frame_class'
comskip-mpeg2dec.o: In function `(anonymous namespace)::stream_component_open((anonymous namespace)::VideoState*, int)':
mpeg2dec.cpp:(.text+0x2066): undefined reference to `avcodec_find_decoder'
mpeg2dec.cpp:(.text+0x2089): undefined reference to `avcodec_open2'
mpeg2dec.cpp:(.text+0x21aa): undefined reference to `avcodec_alloc_frame'
comskip-mpeg2dec.o: In function `(anonymous namespace)::file_open()':
mpeg2dec.cpp:(.text+0x2335): undefined reference to `avformat_alloc_context'
mpeg2dec.cpp:(.text+0x2361): undefined reference to `avformat_open_input'
mpeg2dec.cpp:(.text+0x23ca): undefined reference to `avformat_find_stream_info'
mpeg2dec.cpp:(.text+0x2430): undefined reference to `av_dump_format'
mpeg2dec.cpp:(.text+0x2479): undefined reference to `av_find_best_stream'
mpeg2dec.cpp:(.text+0x264f): undefined reference to `av_find_best_stream'
comskip-mpeg2dec.o: In function `(anonymous namespace)::file_close()':
mpeg2dec.cpp:(.text+0x26d2): undefined reference to `avcodec_close'
mpeg2dec.cpp:(.text+0x2703): undefined reference to `avcodec_close'
mpeg2dec.cpp:(.text+0x272b): undefined reference to `avformat_close_input'
comskip-mpeg2dec.o: In function `main':
mpeg2dec.cpp:(.text+0x274d): undefined reference to `avcodec_register_all'
mpeg2dec.cpp:(.text+0x2752): undefined reference to `av_register_all'
mpeg2dec.cpp:(.text+0x2abe): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x2b6c): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x2d10): undefined reference to `av_read_frame'
mpeg2dec.cpp:(.text+0x2fa7): undefined reference to `av_free_packet'
collect2: ld returned 1 exit status
make[1]: *** [comskip] Error 1
make[1]: Leaving directory `/home/xbmc/comskip-0.91b'
make: *** [all] Error 2
Manually trying the final g++ command doesn't help, no matter how much I play with options (e.g. adding the other ffmpeg libraries).
I wonder if it's an issue with how I've compiled ffmpeg - a quick squint on Google suggests that other people have had similar problems when linking dependent programs, but (sadly) for a whole variety of different reasons.
No worries, maybe someone else can take a look, the world won't end!
HNY to all, anyway.