简体   繁体   English

为架构'armv7'选择了不支持的编译器'GCC 4.2'

[英]Unsupported compiler 'GCC 4.2' selected for architecture 'armv7'

Just installed new version XCode 4.2 onto my Mac. 刚安装了新版本的XCode 4.2到我的Mac上。 I tried compiling my project but got the following error: 我尝试编译我的项目但得到以下错误:

Unsupported compiler 'GCC 4.2' selected for architecture 'armv7' 为架构'armv7'选择了不支持的编译器'GCC 4.2'

Tried selecting arm7 in drop down for architechture in project and target settings. 尝试在项目和目标设置中选择arm7以进行构建。 (The list actually shows just arm 7) still no use. (该列表实际上只显示了手臂7)仍然没有用。

Please help. 请帮忙。

Thanks 谢谢

你应该实际选择“编译器版本”下的LLVM编译器,而不是试图设置“有效的架构”

xcode build errors: xcode构建错误:

Unsupported compiler ‘GCC 4.2′ selected for architecture ‘i386′

Solution: 解:

This can be caused by importing a project for a pre- iOS 5 SDK into a copy of xcode with iOS 5 SDK only. 这可能是因为将iOS 5之前的SDK项目导入到仅使用iOS 5 SDK的xcode副本中。

To fix, click your 要修复,请单击您的

Project -> Build Settings.  

Then under Build Options, there is an entry for Compiler for C/C++/Objective-C. 然后在Build Options下,有一个Compiler for C / C ++ / Objective-C的条目。 Choose Apple LLVM compiler 3.0. 选择Apple LLVM编译器3.0。

There is a chance this could effect other aspects of your binaries as you are using a new compiler, so YMMV. 当您使用新的编译器时,这可能会影响二进制文件的其他方面,因此YMMV。 That being said, it's so far caused no issues for me. 话虽这么说,但到目前为止对我来说没有任何问题。

If you have multiple projects included within a single xCode project, go to editor>Validate project settings . 如果您在单个xCode项目中包含多个项目,请转到编辑器>验证项目设置 This will set the compiler to LLVM 5.0 even if you don't see that option normally 即使您没有正常看到该选项,这也会将编译器设置为LLVM 5.0

转到BuildSettings-> BuildOptions-> CompilerFor c / c ++ / Objective C并从'Unsupported Compiler GCC4.2'更改为LLVM GCC 4.2

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

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