【问题标题】:Compiling OpenCV for iOS fails - Cmake fails为 iOS 编译 OpenCV 失败 - Cmake 失败
【发布时间】:2014-06-01 14:42:58
【问题描述】:

我尝试为 ios 编译 OpenCV。我一直收到这些错误。我用不同版本的opencv试了一下,结果都是一样的。

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

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

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

【问题讨论】:

    标签: c++ ios xcode opencv cmake


    【解决方案1】:

    老版本的 CMake 似乎有问题。尝试从他们的网站更新到最新的 CMake(您使用哪个操作系统版本和 CMake 版本?)

    另见:http://answers.opencv.org/question/6789/problem-with-installation-opencv/ 还有这个(我认为这个问题很相似):https://github.com/urho3d/Urho3D/issues/308

    【讨论】:

    • cmake 版本 2.8.12 和 Mac OSX 10.9.2 我检查了该链接并下载了 v 2.4.3.1 并进行了编译。结果是一样的。
    • 它的工作。极好的。这真的是因为旧版本的 CMake。当您询问时,我有 2.8.12.1,它在命令行上只显示 2.8.12,我想我有最新版本 2.8.12.2。我再次使用端口安装它,并运行 python 脚本,它工作。非常感谢!
    • 我又遇到了一个错误,你有时间可以看看吗? stackoverflow.com/questions/23156007/…
    猜你喜欢
    • 2014-06-03
    • 1970-01-01
    • 1970-01-01
    • 2018-02-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-21
    • 1970-01-01
    相关资源
    最近更新 更多