我一直在尝试编译最近发布的openCV(2.4.3),但是遇到了问题。我在openCV目录中创建了一个构建文件夹并运行了以下命令:
cmake -G "Unix Makefiles" ..
make -js
我遇到了以下错误:
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)
还有一些其他的内容,但剩下的消息与此类似。看起来连接器在处理highgui时遇到了困难。
当我尝试使用XCode运行代码时,我收到了一个类似的错误信息,这可能是因为我以前(某种奇迹般地)安装过openCV(我删除了以前的安装程序)。
有什么想法吗?