Hi, On Tue, May 11, 2010 at 3:22 AM, Ferenc Deak <[email protected]> wrote: > gcc -Wall -g live_segmenter.c -o live_segmenter \ > /usr/local/src/ffmpeg-20900/libavcodec/libavcodec.a > /usr/local/src/ffmpeg-20900/libavformat/libavformat.a > /usr/local/src/ffmpeg-20900/libavutil/libavutil.a \ > /usr/local/src/ffmpeg-20900/libavdevice/libavdevice.a \ > /usr/local/src/ffmpeg-20900/libswscale/libswscale.a \ > /usr/local/src/ffmpeg-20900/libpostproc/libpostproc.a \ > -lpthread -lbz2 -lm -lz -lfaac -lmp3lame -lx264 -lfaad > > and I get the following output: > > /usr/local/src/ffmpeg-20900/libavformat/libavformat.a(allformats.o): In > function `av_register_all': > /usr/local/src/ffmpeg-20900/libavformat/allformats.c:47: undefined reference > to `avcodec_register_all'
Do it as ffmpeg.c does it itself: -lavdevice -lavformat -lavcodec -lswscale -lavutil -lz -lbz2 -lm I think ordering here matters, so use the same library order as ffmpeg.c and you should be fine. Ronald _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
