3 Replies - 1765 Views - Last Post: 26 January 2013 - 04:30 PM Rate Topic: -----

#1 jerryoak  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 20-April 12

How to start the GNU Fortran compiler.

Posted 26 January 2013 - 03:38 PM

I just installed the GNU Fortran compiler on my MAC OS X machine. I seemed to install without any errors, with the message "The programs have been installed in /usr/local/gfortran/". How do I start this compiler? I can't find any directory named /usr/local/gfortran/!

Is GNU Fortran the best choice? I have a small legacy Fortran program that I would like to convert (and extend) to python.

Thanks, Jerry
Is This A Good Question/Topic? 0
  • +

Replies To: How to start the GNU Fortran compiler.

#2 sepp2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2395
  • View blog
  • Posts: 3,725
  • Joined: 21-June 11

Re: How to start the GNU Fortran compiler.

Posted 26 January 2013 - 03:45 PM

If the installation was successfulč you should be able to run the compiler simply by typing gfortran mycode.f (where mycode.f is your source file).

However if the installer says it installed to /usr/local/fortran and that directory does not actually exist, the installation probably wasn't successful.
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is offline

  • don't rely on secrecy
  • member icon

Reputation: 5951
  • View blog
  • Posts: 23,446
  • Joined: 12-December 12

Re: How to start the GNU Fortran compiler.

Posted 26 January 2013 - 03:58 PM

gfortran --version


should confirm if it is installed. At least, it does from MSYS on Windows - assume it's the same command on OSX.

This post has been edited by andrewsw: 26 January 2013 - 03:59 PM

Was This Post Helpful? 0
  • +
  • -

#4 jerryoak  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 20-April 12

Re: How to start the GNU Fortran compiler.

Posted 26 January 2013 - 04:30 PM

View Postsepp2k, on 26 January 2013 - 05:45 PM, said:

If the installation was successfulč you should be able to run the compiler simply by typing gfortran mycode.f (where mycode.f is your source file).

However if the installer says it installed to /usr/local/fortran and that directory does not actually exist, the installation probably wasn't successful.


Thanks Sepp2k! It was as easy as that.

Jerry
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1