This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Possible gfortran documentation oversight with regards to linking options?
- From: Miles McCammon <MilesM at stetsonengineers dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 4 May 2017 16:56:06 +0000
- Subject: Possible gfortran documentation oversight with regards to linking options?
- Authentication-results: sourceware.org; auth=none
- Authentication-results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=stetsonengineers.com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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.
v/r,
Miles