B
bartek
Hi,
I'm aware that both quoted and angle-bracketed strings in an #include
directive result in implementation-defined file lookup, differing in the
fact that #include "foo.h" first checks *something* and then falls back to
the same behaviour as #include <foo.h>.
Now, in reality #include <foo.h> generally results in file name being
checked up in explicitly specified locations (-I command line options,
system header locations), while the double quoted version gets the current
directory checked first.
My question is:
- Is that the current working directory? E.g. the directory from which the
compiler is being run.
- Or, the directory where the file with the said #include directive being
parsed is lying?
What's the common behaviour?
Cheers.
I'm aware that both quoted and angle-bracketed strings in an #include
directive result in implementation-defined file lookup, differing in the
fact that #include "foo.h" first checks *something* and then falls back to
the same behaviour as #include <foo.h>.
Now, in reality #include <foo.h> generally results in file name being
checked up in explicitly specified locations (-I command line options,
system header locations), while the double quoted version gets the current
directory checked first.
My question is:
- Is that the current working directory? E.g. the directory from which the
compiler is being run.
- Or, the directory where the file with the said #include directive being
parsed is lying?
What's the common behaviour?
Cheers.