Apple doesn't have any kind of fortran for Mac OS X / Darwin. However, various flavors of fortran are included in various flavors of GCC. You can use MacPorts to install GCC 4.1 (I think GCC 4.2 is still developmental). Someplace useful to you at some point is http://gcc.gnu.org/wiki/GFortranGettingStarted. I know that I've compiled other peoples code that contains fortran (R language for statistical computing) under MacPorts. With that said, MacPorts doesn't seem to find the direct command to start the compiler (gfortran). I suspect you will need a 'portfile' to get this working. For my part, I haven't written fortran since ... 1977. Chuck On Jun 2, 2007, at 12:44 PM, macports-users- request@lists.macosforge.org wrote:
Message: 9 Date: Sat, 2 Jun 2007 12:44:43 -0400 From: Andre-John Mas <ajmas@sympatico.ca> Subject: Fortran To: MacPorts Users <macports-users@lists.macosforge.org> Message-ID: <5F50DAC7-F5D7-4A03-89D3-C9BE61BFABFD@sympatico.ca> Content-Type: text/plain; charset=US-ASCII; format=flowed
Hi,
I have just been given some fortran source, which I need to compile, so I was curious to know whether a fortran compiler existed as part of MacPorts? There doesn't seem to be a Fortran compiler as part of the basic gcc installers that comes with XCode, at least there doesn't seem to be an f77 command.
On 2.6.2007, at 20.50, Charles White wrote:
Apple doesn't have any kind of fortran for Mac OS X / Darwin. However, various flavors of fortran are included in various flavors of GCC. You can use MacPorts to install GCC 4.1 (I think GCC 4.2 is still developmental). Someplace useful to you at some point is http://gcc.gnu.org/wiki/GFortranGettingStarted. I know that I've compiled other peoples code that contains fortran (R language for statistical computing) under MacPorts. With that said, MacPorts doesn't seem to find the direct command to start the compiler (gfortran). I suspect you will need a 'portfile' to get this working. For my part, I haven't written fortran since ... 1977.
Chuck
On Jun 2, 2007, at 12:44 PM, macports-users- request@lists.macosforge.org wrote:
Message: 9 Date: Sat, 2 Jun 2007 12:44:43 -0400 From: Andre-John Mas <ajmas@sympatico.ca> Subject: Fortran To: MacPorts Users <macports-users@lists.macosforge.org> Message-ID: <5F50DAC7-F5D7-4A03-89D3-C9BE61BFABFD@sympatico.ca> Content-Type: text/plain; charset=US-ASCII; format=flowed
Hi,
I have just been given some fortran source, which I need to compile, so I was curious to know whether a fortran compiler existed as part of MacPorts? There doesn't seem to be a Fortran compiler as part of the basic gcc installers that comes with XCode, at least there doesn't seem to be an f77 command.
Hi, gcc42 went stable a while ago, so that is the current official release. Looking at the port system bin directory, the way to launch the compiler seems to be 'gfortran-mp-4.2'. I didn't test this, but there it seems to sit waiting for code to compile:-) ! ! Jyrki Wahlstedt ! skype:jyrkiwahlstedt ! http://www.wahlstedt.fi/jyrki/ ! ! Our life is no dream; but it ought to become one and perhaps will. ! PGP key ID: 0x139CC386 fingerprint: F355 B46F 026C B8C1 89C0 A780 6366 EFD9 139C C386
On 02.06.2007, at 19:52, Jyrki Wahlstedt wrote:
gcc42 went stable a while ago, so that is the current official release. Looking at the port system bin directory, the way to launch the compiler seems to be 'gfortran-mp-4.2'. I didn't test this, but there it seems to sit waiting for code to compile:-)
That's correct. I have also successfully used it to compile code -- for other ports in the MacPorts system and for my "own" code as well. (I do not program new in Fortran myself, but have many colleagu There's also a g95 port in MacPorts, which has its pros and cons -- personally I don like it too much: if only for the political decisions made by its maintainer, but also because I find gfortran on most number crunchers I work on, but not g95. Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen- Kuepper.de Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D Sex, drugs and rock-n-roll
participants (3)
-
Charles White
-
Jochen Küpper
-
Jyrki Wahlstedt