[FFmpeg-user] compiling ffmpeg with swscale

Nicolas George nicolas.george at normalesup.org
Tue Jul 10 19:29:29 CEST 2012


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. You should try
building and linking a C program that uses sws_scale (no need to make it
complex, as there is actually no need to run it). If it works, my guess is
confirmed.

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/20120710/f8bd83e4/attachment.asc>


More information about the ffmpeg-user mailing list