Mac g77 fortran compiler

enricoc

macrumors newbie
Original poster
Oct 5, 2006
2
0
Hi, I'm new to MacBook Pro and I've seen that no g77 compiler is still available. I have to use some fortran subroutines within C++ program. In the past, I used to create a fortran lib which was called together with f2c in the g++ compilation stage of the C++ main program.
Is there anyone who can help me?
Thanks in advance Enrico
 

rtharper

macrumors regular
Sep 6, 2006
203
0
Oxford, UK
enricoc said:
Hi, I'm new to MacBook Pro and I've seen that no g77 compiler is still available. I have to use some fortran subroutines within C++ program. In the past, I used to create a fortran lib which was called together with f2c in the g++ compilation stage of the C++ main program.
Is there anyone who can help me?
Thanks in advance Enrico
Correct me if I'm wrong, for I'm no FORTRAN programmer (and if there's any deity that likes me I never will be) but doesn't GCC have full support for FORTRAN?
 

iMeowbot

macrumors G3
Aug 30, 2003
8,643
0
rtharper said:
Correct me if I'm wrong, for I'm no FORTRAN programmer (and if there's any deity that likes me I never will be) but doesn't GCC have full support for FORTRAN?
The GCC supplied by Apple omits it. There are third-party builds that include it.
 

Eraserhead

macrumors G4
Nov 3, 2005
11,124
10,447
UK
I believe G95 allows compilation of Fortran 77 code as well as Fortran 95 code. It is also totally free, though the code will run faster with the Intel compiler mentioned above.
 

ChrisA

macrumors G4
Jan 5, 2006
11,641
406
Redondo Beach, California
enricoc said:
Hi, I'm new to MacBook Pro and I've seen that no g77 compiler is still available. I have to use some fortran subroutines within C++ program. In the past, I used to create a fortran lib which was called together with f2c in the g++ compilation stage of the C++ main program.
Is there anyone who can help me?
Thanks in advance Enrico
Look for f2c i the "fink" project. You could try and build a GCC from source with FORTRAN support enabled but that is a project in itself. f2c is an easy way out. You can run f2c by hand or integrate f2c into your Makefile