how to change default compiler?

Discussion in 'Mac Programming' started by bamdad, Dec 25, 2011.

  1. bamdad macrumors newbie

    Aug 8, 2009
    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.
  2. itsmrjon macrumors regular

    Jun 11, 2011
    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.

Share This Page