Re: What are GCC's "Standard system directories" on GNU/Linux?

Liste des GroupesRevenir à cl c 
Sujet : Re: What are GCC's "Standard system directories" on GNU/Linux?
De : dan (at) *nospam* djph.net (Dan Purgert)
Groupes : comp.lang.c
Date : 05. Feb 2025, 14:05:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <slrnvq6ohl.983.dan@djph.net>
References : 1
User-Agent : slrn/1.0.3 (Linux)
On 2025-02-05, Alan Mackenzie wrote:
Hello, comp.lang.c.
>
In the GCC manual, section 3.16 "Options for Directory Search" partially
describes where, how, and in what order GCC finds #include files when
compiling.
>
It's the "partially" bit which is getting on my nerves.  The manual
section contains a priority list for finding #include files, but the
fifth item just vaguely states:
>
    5. Standard system directories are scanned.
>
.  Which directories are these?  Where is this documented?

It is, as I recall, defined at compile time of gcc. You can get your
system-specific "standard system directories" by running the command:

  echo | gcc -xc -E -v -

It'll print out a bunch of stuff, starting off with the compile-time
options that were used when compiling gcc itself.  The bit you're
looking for being listed out under the heading:

  #include <...> search starts here:


HTH

--
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1  E067 6D65 70E5 4CE7 2860

Date Sujet#  Auteur
5 Feb 25 * What are GCC's "Standard system directories" on GNU/Linux?5Alan Mackenzie
5 Feb 25 +* Re: What are GCC's "Standard system directories" on GNU/Linux?2Dan Purgert
5 Feb 25 i`- Re: What are GCC's "Standard system directories" on GNU/Linux?1Alan Mackenzie
5 Feb 25 `* Re: What are GCC's "Standard system directories" on GNU/Linux?2Kaz Kylheku
5 Feb 25  `- Re: What are GCC's "Standard system directories" on GNU/Linux?1Michael S

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal