This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with <cstdio> and AIX 4.3.3
- From: Joe Buck <jbuck at synopsys dot COM>
- To: dje at watson dot ibm dot com (David Edelsohn)
- Cc: chip dot cuntz at earthling dot net (Chip Cuntz), gcc at gcc dot gnu dot org
- Date: Wed, 12 Dec 2001 14:48:20 -0800 (PST)
- Subject: Re: Problem with <cstdio> and AIX 4.3.3
> >>>>> "Chip Cuntz" writes:
>
> Chip> g++ -c -I/usr/include -I../include -D__AIX__ -D__UNIX__ com_bmf.c
David Edelsohn writes:
> I just noticed something suspicious about your commandline: why
> are you explicitly adding -I/usr/include? The compiler implicitly
> searches that directory already. Your adding it to the commandline is
> altering the search order, probably causing GCC to find a different
> version of some header file than its own, internal version.
David's objection is not strong enough. For C++, any attempt to put
-I/usr/include on the command line, and then to include standard headers,
is likely to fail, unless your OS populates /usr/include only with ISO C++
compliant headers designed to work with g++. This pretty much means that
if you do this on any proprietary operating system, as well as most free
ones, it will fail.