Search for built-in header and application header



Hi,
I always have an impression that for the following semantics:
#include <something> e.g. #include <stdio.h>
Compiler searches it from built-in header search path, on UNIX, it
could be /usr/include, /bin/include.

And for the following semantics:
#include "someting" e.g. #include "mine.h"
Compiler searches it according to the -I command option and the
built-in search path.

But I just encountered a problem, it is Visual C++ compiler, it
seems for #include <> type, it also search for -I path. And it
automatically add "include" to the end of -I path, here is an example:

I have -I c:/repo in VC compiler path and in my C code, I have:
#include <auto_array> while the file actually locates at c:/repo/
include/auto_array, but VC compiler finds it.

Could you confirm 2 things:

1. Compiler searches builtin path and -I command option for both
"#include <>" and "#include "" " type include.

2. Compiler add "include" to the end of each search path named in -I
option.

Here is copy & paste from my compile command:

c:/msvsn2003/vc7/bin/cl.exe -W3 -Tp ../s/TestUtils.c -c -nologo -GR -
MDd -Ob2 -Zi -GX -DDEBUG -DNT -DNO_TCL_STUBS -FdlibTestUtils.pdb -
FplibTestUtils.pch -Ic:/repo -I../i
TestUtils.c

Thanks.

.



Relevant Pages

  • Re: Search for built-in header and application header
    ... I always have an impression that for the following semantics: ... Compiler searches it from built-in header search path, on UNIX, it ...
    (comp.lang.c)
  • Re: Bunch of Delphi 7 bugs/misfeatures, pls advise?
    ... > message gives NOT A CLUE as to what source file package, unit, or blimblop ... > as part of the search path. ... > the search path thru a {$ compiler directive? ... Delphi 7 seems to quite often point me to ...
    (comp.lang.pascal.delphi.misc)
  • Re: Delphi Compiler Messages
    ... I don't want to fix every issue in the entire jedi vcl source. ... I'll try manipulating the search path and isolating the dcu's thanks. ... > I don't even let the compiler compile those files. ... > the linker can find the compiled code. ...
    (borland.public.delphi.ide)
  • Re: compiler search path for the headers
    ... I'm not sure what you mea by "builtin path". ... Compiler searches it from built-in header search path, on UNIX, it ... Compiler searches builtin path and -I command option for both ...
    (microsoft.public.vc.language)
  • Re: Search for built-in header and application header
    ... Compiler searches it from built-in header search path, on UNIX, it ...
    (comp.lang.c)