For the new project you'll have to add the
..\include\in1 folder, too.
I'm not sure I get what you think the issue shall be. The compiler does exactly what you want. In the second case the compiler command line (without adding
..\include\in1) is:
mingw32-g++.exe -I- -I. -I..\include -ID:\Devel\GCC345\include -c main.cpp -o .objs\main.o
Using the "generat PCH in the object output dir" enables the "
-I-" compiler switch. If you read what's said about the "
-I-" switch it makes perfect sense that the compiler complains about "
../in0.h: No such file or directory":
-I- Split the include path. Any directories specified with -I options before -I-
are searched only for headers requested with "#include "file""; they are not
searched for "#include <file>". If additional directories are specified with -I
options after the -I-, those directories are searched for all #include directives.
In addition, -I- inhibits the use of the directory of the current file directory as
the first search directory for "#include "file"".
This means that you have to explicetly add all header include folders after the "
-I-" switch (in the compiler options of your project). If you do that it'll compile just fine.
With regards, Morten.