【问题标题】:How to build OpenCV 2.4.8 for iOS7?如何为 iOS7 构建 OpenCV 2.4.8?
【发布时间】:2014-04-08 00:54:54
【问题描述】:

我尝试让我的 EyeTracking 系统再次运行。我知道已经有一些问题涉及相同的问题 (How to compile OpenCV for iOS7 (arm64)),但这些对我没有任何帮助。 github上的最新版本已经内置了所有的arm64架构插件。所以我不必更改python build_framwork.py。但是按照 OpenCV 文档 (http://docs.opencv.org/doc/tutorials/introduction/ios_install/ios_install.html#ios-installation) 上框架的构建说明会在终端中出现以下错误:

sh: cmake: command not found
User defaults from command line:
    IDEBuildOperationMaxNumberOfConcurrentCompileTasks = 8

Build settings from command line:
    ARCHS = armv7
    IPHONEOS_DEPLOYMENT_TARGET = 6.0
    SDKROOT = iphoneos7.0

xcodebuild: error: The directory /Users/julesair/Open_CV/ios/build/iPhoneOS-armv7 does not contain an Xcode project.

Build settings from command line:
    ARCHS = armv7
    IPHONEOS_DEPLOYMENT_TARGET = 6.0
    SDKROOT = iphoneos7.0

xcodebuild: error: The directory /Users/julesair/Open_CV/ios/build/iPhoneOS-armv7 does not contain an Xcode project.

    sh: cmake: command not found
    User defaults from command line:
        IDEBuildOperationMaxNumberOfConcurrentCompileTasks = 8

    Build settings from command line:
        ARCHS = armv7s
        IPHONEOS_DEPLOYMENT_TARGET = 6.0
        SDKROOT = iphoneos7.0

    xcodebuild: error: The directory /Users/julesair/Open_CV/ios/build/iPhoneOS-armv7s does not contain an Xcode project.

    Build settings from command line:
        ARCHS = armv7s
        IPHONEOS_DEPLOYMENT_TARGET = 6.0
        SDKROOT = iphoneos7.0

    xcodebuild: error: The directory /Users/julesair/Open_CV/ios/build/iPhoneOS-armv7s does not contain an Xcode project.

    sh: cmake: command not found
    User defaults from command line:
        IDEBuildOperationMaxNumberOfConcurrentCompileTasks = 8

    Build settings from command line:
        ARCHS = arm64
        IPHONEOS_DEPLOYMENT_TARGET = 6.0
        SDKROOT = iphoneos7.0

    xcodebuild: error: The directory /Users/julesair/Open_CV/ios/build/iPhoneOS-arm64 does not contain an Xcode project.

    Build settings from command line:
        ARCHS = arm64
        IPHONEOS_DEPLOYMENT_TARGET = 6.0
        SDKROOT = iphoneos7.0

    xcodebuild: error: The directory /Users/julesair/Open_CV/ios/build/iPhoneOS-arm64 does not contain an Xcode project.

    sh: cmake: command not found
    User defaults from command line:
        IDEBuildOperationMaxNumberOfConcurrentCompileTasks = 8

    Build settings from command line:
        ARCHS = i386
        IPHONEOS_DEPLOYMENT_TARGET = 6.0
        SDKROOT = iphonesimulator7.0

    xcodebuild: error: The directory /Users/julesair/Open_CV/ios/build/iPhoneSimulator-i386 does not contain an Xcode project.

    Build settings from command line:
        ARCHS = i386
        IPHONEOS_DEPLOYMENT_TARGET = 6.0
        SDKROOT = iphonesimulator7.0

    xcodebuild: error: The directory /Users/julesair/Open_CV/ios/build/iPhoneSimulator-i386 does not contain an Xcode project.

    sh: cmake: command not found
    User defaults from command line:
        IDEBuildOperationMaxNumberOfConcurrentCompileTasks = 8

    Build settings from command line:
        ARCHS = x86_64
        IPHONEOS_DEPLOYMENT_TARGET = 6.0
        SDKROOT = iphonesimulator7.0

    xcodebuild: error: The directory /Users/julesair/Open_CV/ios/build/iPhoneSimulator-x86_64 does not contain an Xcode project.

    Build settings from command line:
        ARCHS = x86_64
        IPHONEOS_DEPLOYMENT_TARGET = 6.0
        SDKROOT = iphonesimulator7.0

    xcodebuild: error: The directory /Users/julesair/Open_CV/ios/build/iPhoneSimulator-x86_64 does not contain an Xcode project.

    Traceback (most recent call last):
      File "opencv/platforms/ios/build_framework.py", line 112, in <module>
        build_framework(os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../..")), os.path.abspath(sys.argv[1]))
      File "opencv/platforms/ios/build_framework.py", line 104, in build_framework
        put_framework_together(srcroot, dstroot)
      File "opencv/platforms/ios/build_framework.py", line 80, in put_framework_together
        shutil.copytree(tdir0 + "/install/include/opencv2", dstdir + "/Headers")
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 171, in copytree
        names = os.listdir(src)
    OSError: [Errno 2] No such file or directory: '../build/iPhoneOS-arm64/install/include/opencv2'

谁能告诉我如何解决这个问题或问题是什么?

【问题讨论】:

    标签: opencv ios7 build arm64


    【解决方案1】:
    sh: cmake: command not found
    

    本项目使用cmake 构建,它是一个命令行实用程序。 cmake 不作为 Xcode 5 工具的一部分包含在 Mac OS X 中 - 您需要自己安装它。 http://www.cmake.org/cmake/resources/software.html

    【讨论】:

    • 所以我现在可以使用 cmake 构建它,但是无论如何完成构建都会失败并且没有构建任何框架。有一些文件丢失。也许你熟悉 opencv 框架。我在哪里可以得到它或如何解决问题? /Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool:无法打开文件:/Users/julesair/Open_CV/ios/build/iPhoneOS-arm64/3rdparty/libjpeg/OpenCV.build/ Release-iphoneos/libjpeg.build/Objects-normal/arm64/jmemansi.o(没有这样的文件或目录)Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool 失败,退出代码为 1跨度>
    • 对不起,我对 OpenCV 项目一无所知。
    猜你喜欢
    • 2014-02-26
    • 1970-01-01
    • 1970-01-01
    • 2018-02-09
    • 2014-05-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多