2014-04-17 309 views
0

我嘗試爲ios編譯OpenCV。我一直都會遇到這些錯誤。我嘗試過不同版本的opencv,但結果是一樣的。編譯OpenCV for iOS失敗 - Cmake失敗

我運行此: 蟒平臺/ IOS/build_framework.py ios_opencv_build

我有蟒,cmake並克++編譯器安裝。 有沒有人有一個想法這些錯誤是什麼意思,我應該做什麼編譯成功?

-- Setting up iPhoneOS toolchain 
    -- iPhoneOS toolchain loaded 
    -- Setting up iPhoneOS toolchain 
    -- iPhoneOS toolchain loaded 
    -- The CXX compiler identification is Clang 5.1.0 
    -- The C compiler identification is Clang 5.1.0 
    -- Performing Test HAVE_CXX_FSIGNED_CHAR 
    CMake Error at /opt/local/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:37 (get_filename_component): 
     get_filename_component called with incorrect number of arguments 
    Call Stack (most recent call first): 
     CMakeLists.txt:3 (PROJECT) 


    CMake Error: Internal CMake error, TryCompile configure of cmake failed 
    -- Performing Test HAVE_CXX_FSIGNED_CHAR - Failed 
    -- Performing Test HAVE_C_FSIGNED_CHAR 
    CMake Error at /opt/local/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component): 
     get_filename_component called with incorrect number of arguments 
    Call Stack (most recent call first): 
     CMakeLists.txt:3 (PROJECT) 


    CMake Error: Internal CMake error, TryCompile configure of cmake failed 
    -- Performing Test HAVE_C_FSIGNED_CHAR - Failed 
    -- Performing Test HAVE_CXX_W 
    CMake Error at /opt/local/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:37 (get_filename_component): 
     get_filename_component called with incorrect number of arguments 
    Call Stack (most recent call first): 
     CMakeLists.txt:3 (PROJECT) 
... 

回答

2

這似乎是與舊版CMake的問題。試着從他們的網站更新到最新的可用CMake的

參見(OS版本和CMake的版本,你用哪個?):http://answers.opencv.org/question/6789/problem-with-installation-opencv/ 這(我覺得這個問題是相似的):https://github.com/urho3d/Urho3D/issues/308

+0

cmake的版本2.8.12 &Mac OSX 10.9.2我檢查了該鏈接並下載了v 2.4.3.1並進行了編譯。它的結果是一樣的。 – vatti

+1

它的工作。難以置信。這真的是因爲CMake的舊版本。我有2.8.12.1,在命令行中只顯示了2.8.12,當時我想我有最新的版本2.8.12.2。我再次使用端口安裝它,並運行python腳本,它工作。非常感謝! – vatti

+0

我遇到了另一個錯誤,如果你有時間,請你看看嗎? http://stackoverflow.com/questions/23156007/compile-opencv-for-ios-fails – vatti