macos - 带有OpenCV Mac的CMake(小牛)

我想不使用Macports来安装opencv。另外,我不希望这些文件位于local文件夹中。我做了如下

cd opencv-2.4.8
mkdir _build _install
cd _build
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=../_install ..
make 

我收到以下错误
[ 34%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/bitstrm.cpp.o
Linking CXX shared library ../../lib/libopencv_highgui.dylib
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:

最后
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libopencv_highgui.2.4.8.dylib] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2

我的方法有什么问题?

信息:

Mac OS X 10.9.3(OS X小牛)

OpenCV-2.4.8

我已经更新了OS X Mavericks的命令行工具。

最佳答案

如果不使用ffmpeg,请安装ffmpeg或在不使用ffmpeg的情况下构建opencv。
-D WITH_FFMPEG = OFF

https://stackoverflow.com/questions/24138462/

相关文章:

opencv - OpenCV直方图反投影替代

python - OpenCV和Python:knnMatch参数问题

opencv - 在cmake生成的项目中指定libstd

opencv - 如何使用远距离的一个点(使用opencv)来计算相机方向?

opencv - 使用眼睛位置作为引用裁剪检测到的面部

python - OpenCV VideoCapture仅在5个read()之后更新

docker - Tensor Flow服务docker无效字段

docker - 如何创建docker卷设备/主机路径

opencv - 如何在openCV中的图像上绘制不同的形状?

amazon-web-services - 将 s3fs 挂载为 docker 卷