[SOLVED] the aforementioned "#include <errno.h>" error

Robert P. J. Day rpjday@mindspring.com
Tue Dec 6 17:02:00 GMT 2005


On Tue, 6 Dec 2005, Dan Kegel wrote:

> On 12/6/05, Robert P. J. Day <rpjday@mindspring.com> wrote:
> >   oh, man.  i just figured out why i couldn't cross-compile a source
> > file with my newly-generated toolchain.  from the source tree i
> > inherited, i had a source file that included
> >
> >   #include <errno.h>
> >
> > ok, that looks reasonable enough.  but i hadn't noticed that the
> > actual compile command included the option "-I./include", where that
> > local include directory included (you guessed it) a file called
> > "errno.h"
>
> Gaaah!
>
> I've also been bitten in the past by creating a directory named 'new'.
> That caused
>   #include <new>
> to fail in C++ programs.

what throws me is that this build structure *worked* in a cygwin
environment when, as far as i can tell, it *should* fail as it was
failing for me.  that baffles me.

> Two tricks can help figure these things out:
> 1. use the -H option to gcc.  This prints out the exact header files used!

ah, this is the option that allegedly did not exist. :-)  how strange
that it isn't mentioned in the output of "gcc --help", given how
useful it can be.  (at least, i don't see it there.)

rday

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list