From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3816 invoked by alias); 21 Oct 2002 11:05:21 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 3809 invoked from network); 21 Oct 2002 11:05:19 -0000 Received: from unknown (HELO wh2-19.st.uni-magdeburg.de) (141.44.162.19) by sources.redhat.com with SMTP; 21 Oct 2002 11:05:19 -0000 Received: by wh2-19.st.uni-magdeburg.de (Postfix, from userid 1000) id AF34790F60; Mon, 21 Oct 2002 13:05:38 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15795.57215.649515.876285@wh2-19.st.uni-magdeburg.de> Date: Mon, 21 Oct 2002 04:05:00 -0000 From: "Claudio Bley" To: Bui Ngoc Huy Binh Cc: gcc-help@gcc.gnu.org Subject: Re: warnings when compiling In-Reply-To: <3DB3D179.36355A6B@sophia.inria.fr> References: <3DB3D179.36355A6B@sophia.inria.fr> X-SW-Source: 2002-10/txt/msg00233.txt.bz2 >>>>> "Bui" == Bui Ngoc Huy Binh 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 / \