简体   繁体   English

如何在Xcode 5上找到arm-apple-darwin#-llvm-gcc-4.2编译器?

[英]How to find arm-apple-darwin#-llvm-gcc-4.2 compiler on Xcode 5?

I am tying a cross compilation and for that I need to find where Xcode have placed the arm-gcc compiller. 我正在编写一个交叉编译,为此我需要找到Xcode放置arm-gcc compiller的位置。

It used to be in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 but it has vanished in Xcode 5. 它曾经在/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2中,但在Xcode 5中已经消失了。

Any Ideas? 有任何想法吗?

Use the newer clang compiler instead like this: - 使用较新的clang编译器,如下所示: -

for CC: xcrun -find -sdk iphoneos clang 对于CC:xcrun -find -sdk iphoneos clang

for CXX: xcrun -find -sdk iphoneos clang++ 对于CXX:xcrun -find -sdk iphoneos clang ++

It's usually best to use xcrun -find to dynamically locate Xcode command-line tools for you, rather than explicitly using a path, since the path to Xcode tools may change over time. 通常最好使用xcrun -find为您动态定位Xcode命令行工具,而不是显式使用路径,因为Xcode工具的路径可能会随时间而变化。 See man xcrun for details on how to use it, including details on the -sdk iphoneos flag you may need to pass to look for iOS tools. 有关如何使用它的详细信息,请参阅man xcrun ,包括您可能需要传递以查找iOS工具的-sdk iphoneos标志的详细信息。

If xcrun cannot locate the tool, it may no longer be included as part of Xcode. 如果xcrun无法找到该工具,则可能不再将其作为Xcode的一部分包含在内。 See the release notes for Xcode 5 to check if something has been officially removed. 请参阅Xcode 5的发行说明,以检查是否已正式删除某些内容。

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

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