Linking library problem while compiling opencv-3.1.0 for ARM

I have a linking problem while compiling opencv-3.1.0 for my ARM device(omapl138,arm926ej-s) on ubuntu16.04 using arm-linux-gnueabi-g+±5(arm-linux-gnueabi-gcc-5).

I read some tutorials about reading videos from files provided by the,which requires compiling the opencv source code with ffmpeg(WITH_FFMPEG=on).

However,errors occur about linking some ffmpeg libraries.

Actually,those libraris do exist in the system(part of them posted below).


I tried to copy those libraries to the /usr/local/lib and the compiling is successful.But when compiling the application,another linking problem occured(those copied are 64-bit version).

Then I compiled the FFMPEG-2.8.17 with the souce code(using the cross-compile toolchain above). Well,names of libraries(should be 32 bit i guess) I got didn’t match what linker required,so I tried to modified the libraries’ names and did the copy job again.Opencv compiling also succeeded.But when compiling the application,different errors occured.

/usr/local/lib/libavformat-ffmpeg.a(dvenc.o):In function 'dv_init_mux'
/home/rookie/FFmpeg-n2.8.17/libavformat/dvenc.c:340: undefined reference to 'av_dv_codec_profile2'

(I only post part of the errors)

I guess the way that I compiled FFMPEG on my own didn’t work either.So how to solve this linking problem without compiling FFMPEG on my own?

I’m a rookie about opencv.This is my first time to ask a question here.Thanks for your patience!


this looks like a version mismatch issue. you seem to be building ffmpeg from source in your home directory, but it uses headers and libraries that are installed in the system.

do you have multiple versions of ffmpeg on your system?

apart from that, PLEASE DO NOT work with opencv v3.1 because that is incredibly old.