FORTRAN on Mac OSX

carrollp

Registered
I have built a program on Mac OSX using GNU gcc and f77. It runs fine, but when I try to run it on another Mac OSX, I get the error:

dyld: Library not loaded: /usr/local/lib/libg2c.0.dylib


How do I make the program portable to other Mac's?
 
The executable depends on the library specified (/usr/local/lib/libg2c.0.dylib).

On Linux you can specify a "-static" flag to build an executable which isn't dependant on any libraries, but this doesn't work on Mac OS X.

So one possible solution is to either install G77 on each Mac you want to run your program, or at the very least install /usr/local/lib/libg2c.0.dylib.
 
Back
Top