【问题标题】:Detecting C & CXX compiler error in opencv ios在 opencv ios 中检测 C & CXX 编译器错误
【发布时间】:2014-01-04 12:06:21
【问题描述】:

我正在尝试在装有 iOS 6.1、Xcode 4.6.3 和 Mac OS X 10.7.5 的机器上编译 opencv 2.4.6.0。我一直按照opencv website 上的安装说明安装opencv ios 框架。但是我在运行脚本时遇到了一些编译错误:

`python opencv/platforms/ios/build_framework.py ios`

我试图通过在终端窗口上单独运行 python 脚本中给出的 cmake 命令来缩小编译问题的原因。所以如果我跑:

cmake -GXcode -DCMAKE_TOOLCHAIN_FILE=../ios/cmake/Toolchains/Toolchain-iPhoneSimulator_Xcode.cmake -DOPENCV_BUILD_3RDPARTY_LIBS=YES -DCMAKE_XCODE_ATTRIBUTE_GCC_VERSION="com.apple.compilers.llvmgcc42" ../

那么系统无法检测到 C 和 CXX 编译器信息,并且大部分测试都失败了,如下所示:

-- Setting up iPhoneSimulator toolchain
-- iPhoneSimulator toolchain loaded
-- Setting up iPhoneSimulator toolchain
-- iPhoneSimulator toolchain loaded
-- The CXX compiler identification is Clang 4.2.0
-- The C compiler identification is Clang 4.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Failed
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Failed

但是,如果我在没有指定 -DCMAKE_TOOLCHAIN_FILE 的情况下运行相同的 cmake 命令,那么我不会收到 CXX 和 C 编译器错误,如下所示:

cmake -GXcode -DOPENCV_BUILD_3RDPARTY_LIBS=YES -DCMAKE_XCODE_ATTRIBUTE_GCC_VERSION="com.apple.compilers.llvmgcc42" ../

-- The CXX compiler identification is Clang 4.2.0
-- The C compiler identification is Clang 4.2.0
-- Check for working CXX compiler using: Xcode
-- Check for working CXX compiler using: Xcode -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR

我知道这个错误不是由 opencv 引起的,但我想知道其他人在安装 opencv 时是否也遇到了类似的问题。

感谢您的宝贵时间。 夏基尔

【问题讨论】:

  • 同样的问题。看起来系统(环境变量)有问题,但我不知道出了什么问题

标签: ios opencv installation


【解决方案1】:

如果 2.4.7 可以,你可以在这里获得一个工作框架:https://github.com/Fl0p/OpenCV-iOS

您也许可以使用 2.4.6 的早期提交。

【讨论】:

    猜你喜欢
    • 2014-09-09
    • 1970-01-01
    • 2012-10-24
    • 2022-07-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-26
    • 2012-12-31
    相关资源
    最近更新 更多