OpenCV编译错误

3

我一直在尝试编译最近发布的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(我删除了以前的安装程序)。

有什么想法吗?

1个回答

3

我不知道这个问题的具体原因。然而,我找到了一个适用于我的情况的解决方法。我禁用了ffmpeg,似乎编译正常。我清理了我的构建目录,并使用选项-DWITH_FFMPEG=OFF运行了cmake。


关闭FFmpeg的后果是什么? - CroCo

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接