[FFmpeg-user] Linking applications with FFmpeg

Stefano Sabatini stefasab at gmail.com
Thu Sep 20 12:22:26 CEST 2012


On date Thursday 2012-09-20 18:38:44 +0900, Misha Penkov encoded:
> Hello,
> 
> I'm maintaining the FFmpeg tutorials at
> https://github.com/mpenkov/ffmpeg-tutorial.  Recently, I've noticed
> that the tutorial does not link anymore:
> 
> mpenkov at misha-desktop:~/git/ffmpeg-tutorial$ make bin/tutorial01.out
> gcc -Wall -ggdb `pkg-config --cflags libavcodec libavformat libavutil
> libswscale sdl` -c tutorial01.c -o obj/tutorial01.o
> gcc -Wall -ggdb `pkg-config --cflags libavcodec libavformat libavutil
> libswscale sdl` `pkg-config --cflags libavcodec libavformat libavutil
> libswscale sdl` `pkg-config --libs libavcodec libavformat libavutil
> libswscale sdl` -lm obj/tutorial01.o  -o bin/tutorial01.out

Order of libraries specification matters. Try with:
--libs libavformat libavcodec libswscale libavutil 

that is from the "biggest" to the "smaller".
-- 
ffmpeg-user random tip #27
Use the source Luke! If RTFM fails to help you, consider RTFS.


More information about the ffmpeg-user mailing list