Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bamdad

macrumors newbie
Original poster
Aug 8, 2009
16
0
Hi everyone,

I have a question regarding how to change the default compiler in snowleopard. I have performed the steps given in here to install GCC 4.6 on my laptop to compile fortran codes. Now the compiler works fine when I am using the terminal (I have changed my .profile to include the new path to gcc 4.6) but still the newer version is not set as my default compiler. I am using Eclipse to write my codes since I need an IDE that works with Fortran and C++ but I can't get Eclipse to use the new compiler. It automatically uses apple's gcc 4.2 which doesn't have fortran enabled. can you help me with this problem? thank you.
 
Hi everyone,

I have a question regarding how to change the default compiler in snowleopard. I have performed the steps given in here to install GCC 4.6 on my laptop to compile fortran codes. Now the compiler works fine when I am using the terminal (I have changed my .profile to include the new path to gcc 4.6) but still the newer version is not set as my default compiler. I am using Eclipse to write my codes since I need an IDE that works with Fortran and C++ but I can't get Eclipse to use the new compiler. It automatically uses apple's gcc 4.2 which doesn't have fortran enabled. can you help me with this problem? thank you.

It's been a while since I've used an IDE (honestly I think TextMate is the best thing around for C/Fortran these days), but under the build options menu in Eclipse you can specify the absolute path to the compiler.

Or the other route would be to install the new version of gfortran over the version packaged with xcode.

-------
On a tangent, check out TextMate and grab the Fortran bundle for it. Once you learn how the bundles work you'll be able to save a ton of time writing code by just using hotkeys and tabbed inserts. I also used to use eclipse, and to be honest I'm glad I moved away from it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.