简体   繁体   English

Xcode 5“缺少编译器规范LLVM 4.2”错误

[英]Xcode 5 “Missing compiler spec LLVM 4.2” error

I am currently trying to build my project in Xcode 5. Build fails with error: 我目前正在尝试在Xcode 5中构建我的项目。构建失败并出现以下错误:

Dependency Analysis Error: missing compiler specification <XCCompilerSpecification: Some memory address here :'com.apple.compilers.llvmgcc42':MISSING:Default> for file 相关性分析错误: missing compiler specification <XCCompilerSpecification: 此处的一些内存地址 :'com.apple.compilers.llvmgcc42':MISSING:Default> for file

for all code files in project. 用于项目中的所有代码文件。

The project used to be built in Xcode 4.6 with LLVM 4.2 and now Xcode 5 only supports LLVM 5. So there is obviously something related to that here. 该项目以前是在LLVM 4.2的Xcode 4.6中构建的,现在Xcode 5仅支持LLVM5。因此,这里显然存在一些相关的东西。

I have set the build settings in Xcode 5 to use LLVM 5 and the build still fails for the same reason. 我已经在Xcode 5中设置了构建设置以使用LLVM 5,并且出于相同的原因构建仍然失败。 Has anyone encountered this before and know how to stop Xcode 5 from looking for LLVM 4.2 which it no longer supports? 以前有没有人遇到过这种情况,并且知道如何阻止Xcode 5查找不再支持的LLVM 4.2?

This question is as a result of iOS 6 vs 7 appearance build settings 这个问题是iOS 6 vs 7外观构建设置的结果

我有一个同样的问题,我发现在Project-> Build Rules下,正在使用gcc编译器,该编译器在Xcode 5中不再存在。

I found something similar in an old project I have today. 我在今天的一个旧项目中发现了类似的东西。 What happened is that there was a subproject in my project and that one wasn't set to llvm5. 发生的事情是我的项目中有一个子项目,而没有将其设置为llvm5。

You may want to do a search in your directory to find a file specifying llvm 4.2, like such: 您可能需要在目录中进行搜索以找到指定llvm 4.2的文件,例如:

MyMac:~/path/to/my/project $ grep -rHin llvm *

MyProject.xcodeproj/project.pbxproj:334: GCC_VERSION = com.apple.compilers.llvmgcc42;
MyProject.xcodeproj/project.pbxproj:348: GCC_VERSION = com.apple.compilers.llvmgcc42;

If that's the case, try updating that subproject or removing it altogether, see if you can at least clean your build. 如果是这种情况,请尝试更新该子项目或将其完全删除,看看是否至少可以清理构建。

Hope this helps. 希望这可以帮助。

首先,如果您使用虚拟机,那么如果不检查文件就没有权限访问您的项目,可能是问题所在也许您错过了任何文件?

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

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