简体   繁体   English

如何将Xcode上的编译器更改为gcc 7.3.0?

[英]How do I change compiler on Xcode to gcc 7.3.0?

I currently have Xcode 6.2. 我目前有Xcode 6.2。

First is there a way to check if this version of Xcode comes with gcc 7.3.0? 首先,有没有办法检查此版本的Xcode是否带有gcc 7.3.0? And if it does have gcc 7.3.0, how do I set up Xcode so that gcc 7.3.0 becomes the default compiler? 如果它确实具有gcc 7.3.0,如何设置Xcode,使gcc 7.3.0成为默认编译器?

However if my Xcode does not have gcc 7.3.0 how do I get gcc 7.3 and set up Xcode so that gcc 7.3.0 becomes the default compiler? 但是,如果我的Xcode没有gcc 7.3.0,如何获取gcc 7.3并设置Xcode,使gcc 7.3.0成为默认编译器?

Xcode uses the LLVM Clang compiler, not gcc. Xcode使用LLVM Clang编译器,而不是gcc。 gcc can be installed, the easiest way would be using either Homebrew or MacPorts . 可以安装gcc,最简单的方法是使用HomebrewMacPorts I'm not sure if there's any way to make it the default compiler though, especially not to use from inside Xcode. 我不确定是否有办法使它成为默认编译器,尤其是不要从Xcode内部使用它。 Is there some specific feature/reason why you need gcc 7.3? 为什么需要gcc 7.3有一些特定的功能/原因?

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

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