为iOS构建OpenCV失败
我从GitHub下载了OpenCV文件夹并按照ReadMe指令为ios构建。 使用后python opencv/platforms/ios/build_framework.py ios
命令我有以下错误:为iOS构建OpenCV失败
Executing: ['cmake', '-GXcode', '-DAPPLE_FRAMEWORK=ON', '-DCMAKE_INSTALL_PREFIX=install', '-DCMAKE_BUILD_TYPE=Release', '-DIOS_ARCH=armv7', '-DCMAKE_TOOLCHAIN_FILE=/Users/name/Downloads/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DENABLE_NEON=ON', '/Users/name/Downloads/opencv', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode'] in /Users/name/Downloads/ios/build/build-armv7-iphoneos
============================================================
ERROR: [Errno 2] No such file or directory
============================================================
Traceback (most recent call last):
File "opencv/platforms/ios/build_framework.py", line 112, in build
self._build(outdir)
File "opencv/platforms/ios/build_framework.py", line 104, in _build
self.buildOne(t[0], t[1], mainBD, cmake_flags)
File "opencv/platforms/ios/build_framework.py", line 186, in buildOne
execute(cmakecmd, cwd = builddir)
File "opencv/platforms/ios/build_framework.py", line 36, in execute
retcode = check_call(cmd, cwd = cwd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
我该怎么做才能解决这个问题?
如果有人在将来会有同样的问题。 这个问题出现在master分支中,下载分支2.4并在PATH中添加CMake构建过程进行得很顺利
您能解释一下“在PATH中添加CMake”是什么意思?在这条指令的背景下。 http://docs.opencv.org/2.4/doc/tutorials/introduction/ios_install/ios_install.html 我已经下载了“分支2.4”,但无法理解接下来要做什么=(对不起虚拟问题并感谢。 – ZevsVU
@ZevsVU https://stackoverflow.com/questions/32185079/installing-cmake-with-home-brew –
看起来你移动了你的文件,但忘记了更新命令中的路径。你是否将文件复制到文件夹中? – GPhilo