2013-10-17 74 views
0

我現在正在根據How to Build OpenCV Static Libraries Mac OS X中的說明編譯opencv源代碼。我用CMake創建xcode項目沒有問題,並且編譯進行得很順利。我可以看到靜態庫已經創建。但是,當使用項目的安裝功能時,我收到以下錯誤:文件無法在mac上使用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

我用下面的命令來使安裝成功:

cd /Applications/Xcode.app/Contents/MacOS/ 
    sudo ./Xcode /Users/***/Desktop/directory_name/open_source/opencv/xcode/OpenCV.xcodeproj