gfortran -static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Linux and Windows versions of Gfortran work with

  gfortran -static  -o prog.exe prog.f

to produce an executable that can be run on other systems where gfortran is not installed.

But the -static option does not seem to work with gfortran on a MAC, I get  
   ld: library not found for -lcrt0.o
and another person with a different version of gfortran on his MAC gets the same results.  

 gfortran -static-libgfortran prog.f

works, but the executable does not even seem to run on other systems with a different version of gfortran.

So it seems to be impossible to produce any executable with gfortran that has the dynamic libraries loaded
so it can run elsewhere.   

Is there a way to get -static to work on MACs, or any other way to produce a portable executable?

Thanks for your help

Granville Sewell



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux