简体   繁体   English

为iOS编译OpenCV失败-Cmake失败

[英]Compiling OpenCV for iOS fails - Cmake fails

I try to compile OpenCV for ios. 我尝试为iOS编译OpenCV。 I get these errors all the time. 我一直都遇到这些错误。 I tried it with different versions of opencv, but the result is the same. 我用不同版本的opencv尝试过,但是结果是一样的。

I run this: python platforms/ios/build_framework.py ios_opencv_build 我运行此命令:python platform / ios / build_framework.py ios_opencv_build

I have python, cmake and g++ compilers installed. 我安装了python,cmake和g ++编译器。 Does anyone have an idea what these errors mean and what I should do to compile successfully? 有谁知道这些错误是什么意思,我应该怎么做才能成功编译?

  -- 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)
...

It seems like problem with old version of CMake. 似乎是旧版本CMake的问题。 Try updating to newest CMake available from their website (which OS version and CMake version do you use?) 尝试从其网站上更新到最新的CMake(您使用的是哪个OS版本和CMake版本?)

See also: http://answers.opencv.org/question/6789/problem-with-installation-opencv/ and this (I think this problem was similar): https://github.com/urho3d/Urho3D/issues/308 另请参阅: http : //answers.opencv.org/question/6789/problem-with-installation-opencv/,并且(我认为这个问题很相似): https : //github.com/urho3d/Urho3D/issues/ 308

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM