public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/94931] request: print include path
Date: Mon, 04 May 2020 16:27:52 +0000	[thread overview]
Message-ID: <bug-94931-4-YbxGRGQvra@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94931-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94931

--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Mon, May 04, 2020 at 08:23:17AM +0000, ryofurue at gmail dot com wrote:
> 
> But, then the question is, why don't you need the -L option? as in
> 
>     gfortran -I/usr/include mysourcefile.f -L/usr/lib -lnetcdff -netcdf
> 
> 
> Why is this asymmetry?  It seems that there are "standard" places to place
> libraries but not include files . . . 

I think you're seeing the effects of shared libraries.  The
loader has library information:

%  ldconfig -r | grep netcdf
        453:-lnetcdf.15 => /usr/local/lib/libnetcdf.so.15

My advice is to always have the correct -L options.

  parent reply	other threads:[~2020-05-04 16:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03  5:28 [Bug fortran/94931] New: " ryofurue at gmail dot com
2020-05-03 15:54 ` [Bug fortran/94931] " kargl at gcc dot gnu.org
2020-05-04  1:13 ` ryofurue at gmail dot com
2020-05-04  1:27 ` sgk at troutmask dot apl.washington.edu
2020-05-04  1:33 ` ryofurue at gmail dot com
2020-05-04  3:22 ` sgk at troutmask dot apl.washington.edu
2020-05-04  8:23 ` ryofurue at gmail dot com
2020-05-04 16:27 ` sgk at troutmask dot apl.washington.edu [this message]
2020-07-20 10:43 ` dominiq at lps dot ens.fr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94931-4-YbxGRGQvra@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).