This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: warnings when compiling
- From: "Claudio Bley" <bley at cs dot uni-magdeburg dot de>
- To: Bui Ngoc Huy Binh <Binh dot Bui at sophia dot inria dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 21 Oct 2002 13:05:35 +0200
- Subject: Re: warnings when compiling
- References: <3DB3D179.36355A6B@sophia.inria.fr>
>>>>> "Bui" == Bui Ngoc Huy Binh <Binh.Bui@sophia.inria.fr> writes:
Bui> Hi, I use gcc release 3.2 to compile my programe. That's ok
Bui> but I got the warnings as:
Bui> cc1: warning: changing search order for system directory
Bui> "/usr/local/include" cc1: warning: as it has already been
Bui> specified as a non-system directory ignoring duplicate
Bui> directory "/usr/local/include" cc1: warning: changing search
Bui> order for system directory "/usr/include" cc1: warning: as it
Bui> has already been specified as a non-system directory
Bui> I don't understand and i don't know how to fix them ? Can you
Bui> help me ?
I suppose you installed gcc in /usr/local. GCC then regards
/usr/local/include as a system include directory which implicitly is
searched for header files after any other non-system include
directories.
If you specify -I/usr/local/include (what you don't need to) GCC
denotes this directory now as a non-system directory and thus changes
the search order for header files which it was just kind enough
informing you about.
Just don't specify /usr/local/include as non-system include directory
if it already is a system directory.
>From 'man cpp':
-I directory
Add the directory directory to the end of the list of directories
to be searched for header files. This can be used to override a
system header file, substituting your own version, since these
directories are searched before the system header file
directories. If you use more than one `-I' option, the
directories are scanned in left-to-right order; the standard
system directories come after.
--
Claudio Bley ASCII ribbon campaign (")
Debian GNU/Linux advocate - against HTML email X
http://www.cs.uni-magdeburg.de/~bley/ & vCards / \