Mail Archives: djgpp/1998/11/17/04:06:28
On Mon, 16 Nov 1998, Andris Pavenis wrote:
> Specifying full path seems to work with both egcs-1.1 and gcc-2.8.1
> (version of June 1998, I had it on CD, didn't want to mess with
> installing).
I probably should describe the exact exampe where it happens, in case
you didn't see the original message that started this thread.
This is the contents of file.c:
#include "c:/foo/bar.h"
This is the contents of file c:/foo/bar.h:
#include "c:/foo/baz.h"
The contents of c:/foo/baz.h don't matter.
When you compule file.c, CPP complains about baz.h not being there.
But if you change "c:/foo/baz.h" to just "/foo/baz.h", it works.
I'm guessing that, since this is an #include "..." directive, CPP
checks whether the name inside the quotes is absolute, and if not,
appends it to the directory where c:/foo/bar.h is. So, if CPP thinks
c:/foo/baz.h is not an absolute name, it gets something like
"c:/foo/c:/foo/baz.h", which of course fails.
However, this is all without looking into the sources, so I might be
totally wrong in my guesses. But the fact is: the above scenario
fails with GCC 2.7.2.1.
> #include "C:xxxx..." does not work. But does we really need it
My guess is if you solve the nested example above, this C:xxxx thing
will also be solved. In other words, if CPP knows about DOS-style
file names with drive letters, it will handle the d:foo case correctly
as well.
- Raw text -