我现在根据How to Build OpenCV Static Libraries Mac OS X中的说明编译opencv源代码。使用CMake创建xcode项目没有问题,编译也很顺利。我可以看到已经创建了静态库。但是,当我使用项目的安装功能时,我收到以下错误:
/Applications/CMake\ 2.8-11.app/Contents/bin/cmake -DBUILD_TYPE=Debug -P cmake_install.cmake
-- Install configuration: "Debug"
CMake Error at cmake_install.cmake:31 (FILE):
file cannot create directory: /usr/local/include/opencv2. Maybe need
administrative privileges.
有关安装的任何想法吗?
答案 0 :(得分:0)
我使用以下命令使安装成功:
cd /Applications/Xcode.app/Contents/MacOS/
sudo ./Xcode /Users/***/Desktop/directory_name/open_source/opencv/xcode/OpenCV.xcodeproj