2014-06-10 59 views
0

我想在不使用Macports的情況下安裝opencv。另外,我不希望這些文件位於local文件夾中。我做了如下CMake與OpenCV的Mac(小牛)

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小牛隊。

回答

1

如果您不使用它,請安裝ffmpeg或構建opencv而不使用ffmpeg。 -D WITH_FFMPEG =關