[FFmpeg-user] [FFmpeg-devel] undefined reference to sws_getContext and others library linking question

Nicolas George nicolas.george at normalesup.org
Wed Jul 11 09:48:19 CEST 2012


Le quartidi 24 messidor, an CCXX, Chau Pham a écrit :
> LIBS = -lpostproc -lswresample -lswscale -lavfilter -lavdevice -lavformat -lavcodec -lavutil -lm -ldl -Wl

Since you are about tu use static libraries (you did not put --enable-shared
and the error messages show .a files), the -l options must be in dependency
order. For example, libavfilter uses libswresample and libswscale and is
used by libavdevice, so -lavfilter must come after -lavdevice but before
-lswscale and -lswresample. You need also to explicitly add the few system
libraries ffmpeg depends on in its default build; you already added -lm and
-ldl, but you probably need also libz, and possibly the ALSA, SDL, JACK,
etc., libraries, depending on what configure has found.

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/20120711/0344cab9/attachment.asc>


More information about the ffmpeg-user mailing list