Possible gfortran documentation oversight with regards to linking options?

Jonathan Wakely jwakely.gcc@gmail.com
Fri May 5 11:23:00 GMT 2017


On 4 May 2017 at 17:56, Miles McCammon wrote:
> It looks like there are several "linker options: that  are not listed on the documentation page:
>
> https://gcc.gnu.org/onlinedocs/gfortran/Link-Options.html#Link-Options
>
> At least the following are not described in that documentation for gfortran:
>
> -llibrary
> -l library
>     Search the library named library when linking.
>
> -static
>     On systems that support dynamic linking, this prevents linking with the shared libraries. On other systems, this option has no effect.
>
> Those descriptions are from the gcc page.
>
>
> The -llibrary option is used in the pymake (https://github.com/modflowpy/pymake ) for compiling MODFLOW, and the -static option is used by cross-compiling mingw64 gfortran version.
>
> An example makefile generated by pymake which uses the -lc in the linker is included by the USGS in MODFLOW-2005 v. 1.12.0, a copy of which is at the following address:
> https://github.com/mwtoews/MODFLOW-2005/blob/release/make/makefile
>
> Anyways, forwarding this on so hopefully the next person isn't as confused as I was.

This is explained at
https://gcc.gnu.org/onlinedocs/gfortran/Invoking-GNU-Fortran.html



More information about the Gcc-help mailing list