c and fortran on mac
How to Install C and Fortran Compiler on Mac
C
reference: http://www.macobserver.com/tmo/article/install_the_command_line_c_compilers_in_os_x_lion
- Downlaod and install Xcode from App Store.
- Lauching Xcode, go to Preferences and select the Downloads pane, then Components. There, in the list of candidate items will be the Command line tools. Click “Install.”.
- Once done, open Terminal, change to
/usr/bin
and type./gcc -v
to check if gcc has been installed in command use.
Fortran
Reference: http://r.research.att.com/tools/ and http://www.webmo.net/support/fortran_osx.html
- First install Xcode as in C part
- Download gfortran-4.2.3.dmg and install. or may install gfortran-lion-5666-3.pkg which is GNU Fortran 4.2.4 for Mac OS X 10.7 (Lion).