为iOS编译OpenCV失败-Cmake失败 [英] Compiling OpenCV for iOS fails - Cmake fails

查看:107
本文介绍了为iOS编译OpenCV失败-Cmake失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试为iOS编译OpenCV.我一直都遇到这些错误.我在不同版本的opencv中尝试过,但结果是相同的.

I try to compile OpenCV for ios. I get these errors all the time. I tried it with different versions of opencv, but the result is the same.

我运行这个: python platform/ios/build_framework.py ios_opencv_build

I run this: python platforms/ios/build_framework.py ios_opencv_build

我安装了python,cmake和g ++编译器. 有谁知道这些错误是什么意思,我应该怎么做才能成功编译?

I have python, cmake and g++ compilers installed. 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)
...

推荐答案

老版本的CMake似乎有问题.尝试从其网站上更新到最新的CMake(您使用的是哪个OS版本和CMake版本?)

It seems like problem with old version of CMake. Try updating to newest CMake available from their website (which OS version and CMake version do you use?)

另请参阅: http://answers.opencv.org/问题/6789/problem-with-installation-opencv/ 与此(我认为这个问题很相似): https://github.com/urho3d/Urho3D/Issues/308

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

这篇关于为iOS编译OpenCV失败-Cmake失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆