public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* warnings when compiling
@ 2002-10-21  3:05 Bui Ngoc Huy Binh
  2002-10-21  4:05 ` Claudio Bley
  0 siblings, 1 reply; 3+ messages in thread
From: Bui Ngoc Huy Binh @ 2002-10-21  3:05 UTC (permalink / raw)
  To: gcc-help

Hi,


I use gcc release 3.2 to compile my programe. That's ok but
I got the warnings as:

cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning:   as it has already been specified as a non-system
directory
ignoring duplicate directory "/usr/local/include"
cc1: warning: changing search order for system directory "/usr/include"
cc1: warning:   as it has already been specified as a non-system
directory

I don't understand and i don't know how to fix them ? Can you help me ?


Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: warnings when compiling
  2002-10-21  3:05 warnings when compiling Bui Ngoc Huy Binh
@ 2002-10-21  4:05 ` Claudio Bley
  2002-10-21  4:29   ` Bui Ngoc Huy Binh
  0 siblings, 1 reply; 3+ messages in thread
From: Claudio Bley @ 2002-10-21  4:05 UTC (permalink / raw)
  To: Bui Ngoc Huy Binh; +Cc: gcc-help

>>>>> "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 / \

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: warnings when compiling
  2002-10-21  4:05 ` Claudio Bley
@ 2002-10-21  4:29   ` Bui Ngoc Huy Binh
  0 siblings, 0 replies; 3+ messages in thread
From: Bui Ngoc Huy Binh @ 2002-10-21  4:29 UTC (permalink / raw)
  To: Claudio Bley; +Cc: gcc-help

that's ok now. 

thanks.
:)


Claudio Bley wrote:
> 
> >>>>> "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 / \

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-21 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21  3:05 warnings when compiling Bui Ngoc Huy Binh
2002-10-21  4:05 ` Claudio Bley
2002-10-21  4:29   ` Bui Ngoc Huy Binh

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).