error adding symbols: DSO missing from command line

gcc -g -o streamer streamer.c -I/usr/local/ffmpeg/include -L/usr/local/ffmpeg/lib/ -lavformat -lx264  -lavcodec -lswresample -lm -lz -lpthread
/usr/bin/ld: /tmp/ccwUdZJ9.o: undefined reference to symbol 'av_rescale_q@@LIBAVUTIL_54'
/usr/local/ffmpeg/lib/libavutil.so.54: error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status


解决方法:

追加 -lavutil 库便解决


 gcc -g -o streamer streamer.c -I/usr/local/ffmpeg/include -L/usr/local/ffmpeg/lib/ -lavformat -lx264  -lavcodec -lswresample -lm -lz -lpthread -lavutil

你可能感兴趣的:(ffmpeg,linux,ffmpeg)