I'm trying to compile tutorial 01 from enter link description here http://dranger.com/ffmpeg/tutorial01.html copy pasted the code from here: http://dranger.com/ffmpeg/tutorial01.c tried to compile (on linux) like the tutorial said with:
gcc -o tutorial01 tutorial01.c -lavformat -lavcodec -lswscale -lz
and got an error
: /usr/bin/ld: /tmp/ccIT5t82.o: undefined reference to symbol 'av_malloc@@LIBAVUTIL_51'
/usr/lib/i386-linux-gnu/libavutil.so.51: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
any suggestions?
您忘记了链接avutil库,请在编译代码时添加-lavutil。
gcc -o tutorial01 tutorial01.c -lavformat -lavcodec -lswscale -lz -lavutil
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.