0

I have faced problem with compilation project including ffmpeg library and I have no idea what to do with that error.

/usr/lib/i386-linux-gnu/libavformat.a(utils.o): undefined reference to symbol 'av_reduce@@LIBAVUTIL_51' ffmpeg          C/C++ Problem

and here is my linker

Invoking: GCC C++ Linker
g++ -L/usr/lib/i386-linux-gnu -o "ffmpeg"  ./ffmpeg.o   -lpthread -lswscale -lavdevice -lavutil -lavformat -lavcodec -lavfilter -lm -lz -lmp3lame -lpostproc -ldl -lX11 -lSDL -lrt -lswresample

If someone could help me t will be great. Thx

Pawel Rutka
  • 53
  • 1
  • 8
  • this is with standard ffmpeg configure && make? – rogerdpack Mar 21 '14 at 17:42
  • once I followd this: [ http://wiki.razuna.com/display/ecp/FFmpeg+Installation+for+Ubuntu#FFmpegInstallationforUbuntu-InstallFFmpegonUbuntu] and the second one by ffmpeg tutorial and got the same error. – Pawel Rutka Mar 21 '14 at 17:55
  • so you're installing it onto 32 bit ubuntu? what's your full ouput for just using configure && make ? – rogerdpack Mar 21 '14 at 17:57
  • 32 bit lubuntu. Hmm, Right now I dont have one because configure and make run without error, should I look there for something ? – Pawel Rutka Mar 21 '14 at 18:02
  • if they run without error, what are you attempting to do with the above error message? – rogerdpack Mar 21 '14 at 18:03
  • make while build didn't call any error. But when I try to compile project with ffmpeg libs I got this error. ITs an output from compiling project that include libs build before. – Pawel Rutka Mar 21 '14 at 18:04
  • hmm...kind of confused me that your linker was trying to create a file called "ffmpeg" anyway, I'd suggest looking carefully at how ffmpeg's own configure/make is able to create a working ffmpeg, and try and duplicate that. Also make sure you ran a make install [I presume you did] – rogerdpack Mar 21 '14 at 18:07
  • ;) Thats the problem that I did it 3 times - even 2 times on fresh linux. I cannot move on. – Pawel Rutka Mar 21 '14 at 18:13
  • possibly you have some other "libavformat.a" files on your system? – rogerdpack Mar 21 '14 at 18:55
  • right now I am trying one more time on fresh linux. I see i have at /usr/lib/i386... one libavformat.a, one libavutil.a and some libavutil.so so.51 so.51.22.2 – Pawel Rutka Mar 21 '14 at 19:08
  • Can I use .so libs instead of .a ? and How it differ between .so .so.51? – Pawel Rutka Mar 21 '14 at 19:11
  • yeah the multiple libavutil.so versions may be a problem... (I think it automatically uses and links against what it finds, .so first) – rogerdpack Mar 21 '14 at 19:21
  • SO Can You recomend sth? Should I remove some .so ? and let only version that match trought all libs ? I mean : only .so.51 if there are in other libs like avdevice etc? – Pawel Rutka Mar 21 '14 at 19:24
  • yeah probably remove them all, install again [make sure only one version appears listed] – rogerdpack Mar 21 '14 at 20:13

1 Answers1

0

Use this : Error with ffmpeg

Also use:

ld --verbose -l * where * is lib that u're looking for

and ensure that your linker found library that you expect( path to your compiled libs).

Community
  • 1
  • 1
Pawel Rutka
  • 53
  • 1
  • 8