ios 不支持的编译器 'com.apple.compilers.llvmgcc42' xcode 5 DP

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17162975/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 23:58:32  来源:igfitidea点击:

Unsupported compiler 'com.apple.compilers.llvmgcc42' xcode 5 DP

iosxcode5projects-and-solutionsllvm-gccgeos

提问by Azat

I have a project which contains Geos and Proj inside it. Before Xcode 5 I compiled them with LLVM GCC 4.2 compiler, but in Xcode 5 DP I get an error about unsupported compiler. Choosing another compiler get to compilation errors depends on syntax. How can I fix this trouble?

我有一个项目,其中包含 Geos 和 Proj。在 Xcode 5 之前,我使用 LLVM GCC 4.2 编译器编译它们,但在 Xcode 5 DP 中,我收到关于不受支持的编译器的错误。选择另一个编译器会导致编译错误取决于语法。我该如何解决这个问题?

采纳答案by borrrden

A) Stop using Xcode 5

A) 停止使用 Xcode 5

or

或者

B) Fix the errors in your code

B) 修复代码中的错误

I know you won't like that answer but Apple has stated their displeasure for GCC on many occasions and declared it a deprecated technology.

我知道你不会喜欢这个答案,但 Apple 已经多次表达了他们对 GCC 的不满,并宣布它是一项已弃用的技术。

回答by user2523620

Change your compiler for C/C++/Objective-C:

更改 C/C++/Objective-C 的编译器:

Xcode > Target > Build Settings > Build Options > Compiler for C/C++/Objective-C

Xcode > Target > Build Settings > Build Options > Compiler for C/C++/Objective-C

Select Default compiler (Apple LLVM x.y)

选择 Default compiler (Apple LLVM x.y)

回答by Aaron

If you are compiling from the command line (like I do when building GEOS and proj4) The following command will find the correct compiler for you and run it.

如果您从命令行编译(就像我在构建 GEOS 和 proj4 时所做的那样),以下命令将为您找到正确的编译器并运行它。

xcrun --sdk iphoneos clang

Or use iphonesimulator instead of iphoneos if you want to build for the sim.

或者,如果您想为 sim 构建,请使用 iphonesimulator 而不是 iphoneos。