[FFmpeg-user] compiling ffmpeg with swscale

Michael Bradshaw mbradshaw at sorensonmedia.com
Tue Jul 10 19:51:44 CEST 2012

On Tue, Jul 10, 2012 at 11:29 AM, Nicolas George
<nicolas.george at normalesup.org> wrote:
> Le tridi 23 messidor, an CCXX, kev2m at voila.fr a écrit :
>> When I compile it with the command :
>> > g++ -Wl,-O1 -o main main.o mesh.o -L/usr/lib/i386-linux-gnu -L/usr/X11R6/lib -lglut -lQtOpenGL -lQtGui -lQtCore -lGLU -lGL -lpthread -L/usr/local/lib/ -lswscale -lx264
>> I get the error :
>> > main.o: In function `dessiner()':
>> > main.cpp:(.text+0xccb): undefined reference to `sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double const*)'
>> > main.cpp:(.text+0xd1c): undefined reference to `sws_scale(SwsContext*, unsigned char const* const*, int const*, int, int, unsigned char* const*, int const*)'
>> And yet, the files /usr/local/include/libswscale/swscale.h and
>> /usr/local/lib/libswscale{.a, .so, .so.2, .so.2.1.100} exist.
>> I guess (I'm not sure of that) that's because the swscale library is not
>> properly installed. And I would like some advice to install it or to be
>> sure of what the problem is.
> I guess your problem is actually of the "c++ sucks" variety.

Speaking of which, did you surround your includes with extern "C" {}?


More information about the ffmpeg-user mailing list