xcode 5 为 arm64 编译 iPhone 失败
xcode 5 compile for arm64 iPhone failed
我现在正在用 xcode 为 iPhone 构建一个 C++ 库 5. 当我构建架构 "armv7"、"armv7s" 和 "i386" 时,一切很好。但是当我想为 "arm64" 的架构构建时,我有:
C++ Compiler: CMAKE_CXX_COMPILER-NOTFOUND (ver 5.1.0)
好像找不到c++编译器。对了,我现在是用cmake toolchain建库,更详细的报错信息如下:
-- 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
CMAKE_LIBRARY_PATH=/lib;/usr/lib
-- Looking for linux/videodev.h
CMake Error at /Applications/CMake 2.8-11.app/Contents/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
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
CMake Error at /Applications/CMake 2.8-11.app/Contents/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
有什么想法吗?谢谢。
您如何设置目标架构?如果您在 CMAKE_CXX_FLAGS 中指定它们,请尝试使用 CMAKE_OSX_ARCHITECTURES。
有什么理由不使用 Xcode 6 和 CMake 3+?
我现在正在用 xcode 为 iPhone 构建一个 C++ 库 5. 当我构建架构 "armv7"、"armv7s" 和 "i386" 时,一切很好。但是当我想为 "arm64" 的架构构建时,我有:
C++ Compiler: CMAKE_CXX_COMPILER-NOTFOUND (ver 5.1.0)
好像找不到c++编译器。对了,我现在是用cmake toolchain建库,更详细的报错信息如下:
-- 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
CMAKE_LIBRARY_PATH=/lib;/usr/lib
-- Looking for linux/videodev.h
CMake Error at /Applications/CMake 2.8-11.app/Contents/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
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
CMake Error at /Applications/CMake 2.8-11.app/Contents/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
有什么想法吗?谢谢。
您如何设置目标架构?如果您在 CMAKE_CXX_FLAGS 中指定它们,请尝试使用 CMAKE_OSX_ARCHITECTURES。
有什么理由不使用 Xcode 6 和 CMake 3+?