C++ openCV出错

C++ openCV出错,c++,opencv,makefile,C++,Opencv,Makefile,我一直在尝试在openCV(2.4.3)的最新版本上运行make,但我遇到了一些问题。我在openCV目录中创建了一个build文件夹,并运行了以下命令: cmake -G "Unix Makefiles" .. make -js 我得到以下错误: Linking CXX shared library ../../lib/libopencv_highgui.dylib [ 35%] Building CXX object modules/video/CMakeFiles/opencv_vid

我一直在尝试在openCV(2.4.3)的最新版本上运行make,但我遇到了一些问题。我在openCV目录中创建了一个build文件夹,并运行了以下命令:

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(我删除了以前的安装)


有什么想法吗?

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

禁用FFMPEG会产生什么后果?