Question about include path
Ian Lance Taylor
iant@google.com
Tue Feb 1 19:47:00 GMT 2011
<yann@linuxconsole.org> writes:
> I build gcc (4.5.2) from scratch, and i have a question with include
> path.
>
> when i want to include "limits.h" (the good one is at
> /LFS2011/include/limits.h), gcc uses
> /LFS2011/bin/../lib/gcc/i686-pc-linux-gnu/4.5.1/include-fixed/limits.h
>
> When i add "-I/LFS2011/include" it does not look for
> /LFS2011/include/limits.h (bad ?) but when I add "-I/tmp", it looks
> for /tmp/limits.h (good)
>
> What is wrong, where can i look into gcc source code to debug it ?
The code in question is in the libcpp directory and in gcc/cppdefault.c.
However, this seems like an unlikely scenario. Are you sure that the
directory /LFS2011/include exists? Also, use the -v option to see the
exact search path that gcc will use.
Ian
More information about the Gcc-help
mailing list