Hi,
I would like to compile fortran code on mac such that it does not depend on any shared library. Ultimately, I want to be able to send the binary to other people and for it to just work (provided the processor has the right architecture). I noticed that g95 and ifort have a -static flag, which does not work on mac.
If I consider the following program:
program test
print *,'hello world'
end program test
and compile it with
ifort -static-libgcc -static-intel test.f90
The resulting binary still depends on a few shared libraries:
valinor:tmp tom$ otool -L a.out
a.out:
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 103.0.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 315.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 124.1.1)
So is there a way to properly compile fortran code such that it does not depend on any shared library on mac?