openCV make error-Collection of common programming errors
I’ve been trying to run make on the recent release of openCV (2.4.3) but I’ve been having problems. I’ve created a build folder in the openCV directory and ran the following commands:
cmake -G "Unix Makefiles" ..
make -js
I get the following error:
Linking CXX shared library ../../lib/libopencv_highgui.dylib
[ 35%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/bgfg_gaussmix.cpp.o
Undefined symbols for architecture x86_64:
"_ModPlug_GetCurrentOrder", referenced from:
_modplug_read_packet in libavformat.a(libmodplug.o)
"_ModPlug_GetCurrentPattern", referenced from:
_modplug_read_packet in libavformat.a(libmodplug.o)
"_ModPlug_GetCurrentRow", referenced from:
_modplug_read_packet in libavformat.a(libmodplug.o)
"_ModPlug_GetCurrentSpeed", referenced from:
_modplug_read_packet in libavformat.a(libmodplug.o)
"_ModPlug_GetCurrentTempo", referenced from:
_modplug_read_packet in libavformat.a(libmodplug.o)
"_ModPlug_GetLength", referenced from:
_modplug_read_header in libavformat.a(libmodplug.o)
"_ModPlug_GetMessage", referenced from:
_modplug_read_header in libavformat.a(libmodplug.o)
"_ModPlug_GetName", referenced from:
_modplug_read_header in libavformat.a(libmodplug.o)
There’s more but the rest of the message is the similar to that. It looks like the linker is having a hard time with highgui.
I’ve received a similar error when I (somehow miraculously) had openCV installed previously (I deleted the former installation) when trying to run code using XCode
Any thoughts?
-
I don’t know the cause of this particular problem. However, I found a workaround that works for my situation. I disabled ffmpeg and it seems to compile ok. I cleaned out my build directory and ran cmake with the option -DWITH_FFMPEG=OFF
Originally posted 2013-11-06 03:30:48.