简体   繁体   English

如何在XCode 4中使用gcc 4.5?

[英]How do I use gcc 4.5 in XCode 4?

I have install g++-4.5, as I'm interested in the C++0x stuff (done by sudo port install gcc45 ). 我已经安装了g ++-4.5,因为我对C ++ 0x感兴趣(通过sudo port install gcc45 )。 Now I've made sure it's my default compiler (using gcc_select ) and all of my Makefile projects do just fine compiling with 4.5. 现在,我已经确定它是我的默认编译器(使用gcc_select ),并且我的所有Makefile项目都可以使用4.5很好地进行编译。

Now I'm starting a project in xCode 4. How do I get the same C++0x features from within xCode, aka tell xCode to use g++-4.5? 现在,我在xCode 4中启动一个项目。如何从xCode中获得相同的C ++ 0x功能,又告诉xCode使用g ++-4.5?

These two bloggers describe hacking together an Xcode plugin to use one's own build of clang. 这两位博主描述了如何共同使用一个Xcode插件来使用自己的clang版本。 I imagine you could use the same thing but substitute gcc 4.5's path. 我想您可以使用相同的东西,但可以替代gcc 4.5的路径。

http://belkadan.com/blog/2011/07/Using-Clang-from-SVN-in-Xcode/ http://shapeof.com/archives/2010/01/using_the_latest_llvm_with_xcode.html http://belkadan.com/blog/2011/07/Using-Clang-from-SVN-in-Xcode/ http://shapeof.com/archives/2010/01/using_the_latest_llvm_with_xcode.html

I've been meaning to try, and found your question in my research. 我一直想尝试,并在研究中找到了您的问题。

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

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