简体   繁体   English

适用于arm64 iPhone的Xcode 5编译失败

[英]xcode 5 compile for arm64 iPhone failed

I am now building a C++ library for iPhone with xcode 5. When I build the architecture "armv7","armv7s" and "i386", everything is fine. 我现在正在使用xcode 5为iPhone构建一个C ++库。当我构建“ armv7”,“ armv7s”和“ i386”体系结构时,一切都很好。 But when I want to build for the architecture of "arm64", I have: 但是,当我要构建“ arm64”的体系结构时,我有:

 C++ Compiler:                CMAKE_CXX_COMPILER-NOTFOUND  (ver 5.1.0)

It seems that it cannot find the c++compiler. 似乎找不到c ++编译器。 By the way, I am now using cmake toolchain to build the library, and more detailed error messages are as follows: 顺便说一句,我现在正在使用cmake工具链来构建库,并且更详细的错误消息如下:

-- 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

Any ideas? 有任何想法吗? Thanks. 谢谢。

How are you setting the target architectures? 您如何设置目标架构? If you specify them in CMAKE_CXX_FLAGS, try using CMAKE_OSX_ARCHITECTURES instead. 如果在CMAKE_CXX_FLAGS中指定它们,请尝试改用CMAKE_OSX_ARCHITECTURES。

Any reason to not use Xcode 6 and CMake 3+? 有什么理由不使用Xcode 6和CMake 3+?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM