Can anyone tell me how to install f开发者_如何学C77 on Mac OS X 10.6? I am quite new to f77.
Thank you very much
So the compiler you're looking for is gfortran, part of the gcc suite. Gfortran will compile old f77 code, but it will also compile more modern (Fortran90, 95, 2003, and some 2008 support) versions of the same language; if you're going to start working on someone's old f77 code I strongly suggest you learn about what more modern versions of fortran look like. Things have improved greatly. You may see options to install g77, which was the previous generation of gnu fortran compilers -- don't do it. It's 5 years old and hasn't been supported for 4 years.
As to installing gfortran, you have several options:
MacPorts is one great source for linux software on your mac; it builds things for your machine, so installing can take some time. Once you've installed the macports binaries, you can type "sudo port install gcc46 +gfortran" to install the newest gcc and gfortran compilers.
Binaries are available at the HPC for Mac OS X website. I think these are modestly older binaries for 4.5. I haven't tried the gfortran binaries there, but that website is usually reliable.
The gcc wiki points still elsewhere for 4.5 binaries for Mac OS X.
Intel also provides their compiler to OS X and linux users for free under a very specific non-commercial license. If you are going to be using Fortran in a way that is compliant with their licensing terms you can install it from them. They have a pretty good support forum for their OS X/Linux compiler including install directions.
精彩评论