简体   繁体   English

在Mac OS X 10.6中为Eclipse IDE设置默认编译器

[英]Setting up default compiler in Mac os X 10.6 for eclipse IDE

This is my first question here. 这是我的第一个问题。

I am having trouble setting up Eclipse in Mac Os X 10.6 for compiling Fortran codes. 我在Mac Os X 10.6中设置Eclipse来编译Fortran代码时遇到麻烦。 I need to use Eclipse to write a mixed code using both C++ and Fortran. 我需要使用Eclipse使用C ++和Fortran编写混合代码。 I am using Eclipse Helios Service Release 2. The problem starts with Apple's default compiler GCC 4.2 which doesn't have Fortran enabled. 我正在使用Eclipse Helios Service Release2。问题始于Apple的默认编译器GCC 4.2(未启用Fortran)。 I installed GCC 4.6 given here and have managed to get it working in Terminal. 我安装了此处给出的GCC 4.6 并设法使其在Terminal中正常工作。 But still Eclipse and Xcode both use the 4.2 and I can't find a way to change the settings. 但是Eclipse和Xcode仍然都使用4.2,我找不到改变设置的方法。 Can you help me with this problem? 您能帮我解决这个问题吗? I prefer not to the delete the default GCC 4.2. 我不希望删除默认的GCC 4.2。 I just want to get eclipse to use 4.6. 我只想让Eclipse使用4.6。

Thank you. 谢谢。

So I solved this problem by using NetBeans instead of Eclipse. 因此,我通过使用NetBeans而不是Eclipse解决了这个问题。 I simply set up a second compiler profile directed to /usr/local/bin where GCC 4.6 is installed if you use the package provided by HPC . 如果您使用HPC提供的软件包,我只是简单地设置了一个指向/ usr / local / bin的第二个编译器配置文件,其中安装了GCC 4.6。 It automatically detected everything it needs and everything is looking good. 它会自动检测到所需的一切,并且一切看起来都很好。

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

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