Hi...
I'm re-organizing on some of my projects, and I've run into an odd case.
It's making me think that relative #include statements will match not only
relative to the code doing the including but also if there is any relative
match applied to any of the directories in the project's
AdditionalIncludeDirectories. Is this correct?
E.g. if your project has AdditionalIncludeDirectories="..\..\overhere", then a
#include "..\Foo\Bar.h"
in your code will find the include at either
..\Foo\Bar.h
or
..\..\overhere\..\Foo\Bar.h
I have a .h file that has
#include "../3rdPartySource/zlib121/zlib.h"
in it. Now, that directory/library was never one up and over from where
this .h or vcproj were living. The actual location of the zlib.h was
../../3rdPartySource/zlib121/zlib.h
In the AdditionalIncludeDirectories in the vcproj, I had
AdditionalIncludeDirectories="..\include;..\..\3rdPartyBin"
I was thinking the project compiled before because 3rdPartySource and
3rdPartyBin are peers, so
..\..\3rdPartyBin\..\3rdPartySource\zlib121\zlib.h
was the include file found.
Thanks
Mark