我想在Xcode 7.2.1中使用OpenCV 3.1.0.2(最新版本)。
我之前使用OpenCV 2.4.11下载了OpenCv,我使用以下命令生成opencv2.framework:
python opencv-3.1.0\ 2/platforms/ios/build_framework.py ios
但过了一会儿,我的构建失败了。这里的错误是:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/nameUser/openCV/ios/build/arm64-iPhoneOS/3rdparty/zlib/OpenCV.build/Release-iphoneos/zlib.build/Objects-normal/arm64/gzlib.o 3rdparty/zlib/gzlib.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/nameUser/openCV/ios/build/arm64-iPhoneOS/3rdparty/zlib/OpenCV.build/Release-iphoneos/zlib.build/Objects-normal/arm64/gzread.o 3rdparty/zlib/gzread.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
============================================================
ERROR: Command '['xcodebuild', 'IPHONEOS_DEPLOYMENT_TARGET=6.0', 'ARCHS=arm64', '-sdk', 'iphoneos', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '4', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65
============================================================
Traceback (most recent call last):
File "build_framework.py", line 87, in build
self._build(outdir)
File "build_framework.py", line 81, in _build
self.buildOne(t[0], t[1], mainBD, cmake_flags)
File "build_framework.py", line 139, in buildOne
execute(buildcmd + ["-target", "ALL_BUILD", "build"], cwd = builddir)
File "build_framework.py", line 34, in execute
retcode = check_call(cmd, cwd = cwd)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['xcodebuild', 'IPHONEOS_DEPLOYMENT_TARGET=6.0', 'ARCHS=arm64', '-sdk', 'iphoneos', '-configuration', 'Release', '-parallelizeTargets', '-jobs', '4', '-target', 'ALL_BUILD', 'build']' returned non-zero exit status 65
在发布之前,我在互联网上搜索但我找不到任何解决此问题的方法。我甚至不知道这个错误意味着什么。
有人能帮帮我吗? 感谢
答案 0 :(得分:0)
这与我的情况不完全相同,但您可以尝试两种方式:
就我而言,2.x正在运作。如果您同时安装了2.x和3.x,则命令“python”表示3.所以您应该使用“python2.x”命令。
我不确定你能理解我在写什么(我的英语技能不好......)但我希望它可以帮助你解决问题!