Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

openCV make error

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?

like image 718
superkittens Avatar asked Jul 27 '26 12:07

superkittens


1 Answers

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

like image 56
willtalmadge Avatar answered Jul 29 '26 03:07

willtalmadge



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!