[FFmpeg-user] Problem compiling ffmpeg on Ubuntu 11.10

saikari saikari78 at gmail.com
Mon Feb 6 11:49:35 CET 2012


Thank you very much for your reply.
You were right, I hadn't run "make distclean". I run it and it compiled
fine.
However, now I get a linking error when I try to compile a program with gcc,
with the following command line, for instance:

gcc  -lavformat -lavcodec -lavutil  ff1.c

For each function, I get an error of the type:

ff1.c:(.text+0x10): undefined reference to `av_register_all'
collect2: ld returned 1 exit status

Thanks a lot for any hint as to what I'm doing wrong.
I've checked and the header files have been installed in /usr/local/include
and the shared libraries in /user/local/lib.
I've declared the header files in my program as:

#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavutil/avutil.h>

I've tried compiling with the following line:

gcc -I/usr/local/include -L/user/local/lib -lavformat -lavcodec -lavutil 
ff1.c

but I get exactly the same errors.

Best regards

--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Problem-compiling-ffmpeg-on-Ubuntu-11-10-tp4358959p4360887.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list