gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 17:50:10 25 4
gpt4 key购买 nike

我想不使用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

关于macos - 带有OpenCV Mac的CMake(小牛),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24138462/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com