[FFmpeg-user] Linking applications with FFmpeg
Nicolas George
nicolas.george at normalesup.org
Thu Sep 20 13:33:30 CEST 2012
Le jour de la Récompense, an CCXX, Misha Penkov a écrit :
> 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
$(...) is recommended over `...`, but that is unrelated.
> 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
Libraries should be added after object files, in dependency order. For
shared libraries that does not matter much but for static libraries this is
mandatory.
Also, this command line seems too complex: you are requesting the cflags
twice, for no reason since you are only linking.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120920/05a725d5/attachment.asc>
More information about the ffmpeg-user
mailing list