Getting g77 running on my Macintosh MacBook

John Ebel ebel@bc.edu
Thu Mar 25 07:00:00 GMT 2010


Help.

I downloaded g77 into a MacBook I purchased in December because I have some old FORTRAN programs (f77) that want to compile and run.  The tar file was downloaded to my Desktop, where I decompressed it.  When I tried to run it in my terminal window, I discovered that I can only get it to execute if I specify the full path /Users/ebel/Desktop/usr/local/bin/g77.  Using that command, I was able to compile one of my Fortran programs.  However, when I tried to execute the program I created, I could not do so.  I found I could start the execution by specifying the full path name (i.e., /Users/ebel/Documents/HAZARD/eqriskCampbl1.exe), but the code did not run.  I got the error message

dyld: Library not loaded: /usr/local/lib/libg2c.0.dylib
  Referenced from: /Users/ebel/Documents/HAZARD/eqriskCampbl1.exe
  Reason: image not found
Trace/BPT trap

Clearly, the libraries needed by the executable are not included with the executable code.  I assume this is because I do not have the g77 program loaded into the proper location.

I am somewhat familiar with Unix, and I learned operating systems on PDP and Vax VMS machines.  Please send me some instructions on how I can get g77 going so that I can compile and execute my old FORTRAN codes.  I looked around for instructions on how to properly install g77, but I did not see any in the tar file I downloaded.  I tried to wing it, and that obviously did not work the way I wanted it to.

Any help you can give me will be most appreciated.

Sincerely,
John Ebel



More information about the Gcc-help mailing list