On Mon, 10 Jan 2005, Noel Yap wrote:

> Let's say there are multiple files named aoeu.h.  Let's also say you
> don't have control over all the header file names (eg third party
> libraries, system headers, ...).  If a header file does #include
> <aoeu.h>, and it intends to include the one that's related to that
> header file (eg the one in the same directory), how can it guarantee
> the right aoeu.h is included?  Having -I. in the include path won't
> do this since the "." means the directory in which the compiler was
> invoked in.  Putting the aoeu.h's paths in the include paths will
> wind up including the wrong aoeu.h in at least some of the header
> files.
>
> The only robust (eg makes no assumptions about include path)
> solution is to #include "aoeu.h".  Also, since it first checks the
> includer's directory, it's also much faster than traversing the
> include path.

ok, i can buy that argument.  thanks.

rday


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to