Ok, this warrants some explanation....
I use Windows to program, and up until a few months ago, i always used Microsoft Visual C++ IDE (2010, mainly).
But recently i wanted to start developing projects with multi platforms in mind (desktops only, no mobile), and also to experiment on using multiple compilers on the same project, to start writing portable code (both platform wise and compiler wise).
So, in order to do this, i started using Code::Blocks with both GCC and VC10 as the compilers.
My current project is fairly large, but hadn't been a problem until recently, that is, when compiling using GCC only.
I'll explain further.
When i compile my code using GCC, i get the error "file something.h": No such file or directory.
This would be trivial, if the file didn't actually exist, but i noticed that the problem is with the way GCC handles the relative paths to the included file.
Here's a concrete example:
In the "MaterialManager.h" file, i include:
#include "..\..\Shader Manager\_Manager\Program Shader Manager\ProgShaderManager.h"
Now, say that Renderer includes "MaterialManager.h" (which as above, in turn, includes "ProgShaderManager.h").
The problem, is that after a few nested includes, GCC expands this to something like:
D:\ZTUFF\Projects\EDGE\Source\Engine\Systems\Renderer\Render Engine\_Implementations\Render_GL_MultiPass\..\..\..\..\..\Gameplay\Core Objects\Light Object\..\..\..\Game\State Manager\..\..\Resource Managers\Material Manager\_Manager\MaterialManager.h
And this is what is printed in the build log, right before the "No such file or directory".
In my opinion, the reason it fails, is that it exceeds the maximum path size for relative paths, in WIndows (the large string above, has 250 characters, and i think that when GCC tries to append yet another file name, it exceeds the 260 characters).
I've confirmed this, in that, if i replace any #include path that gives an error, by the it's absolute path, it works.
For example:
"D:\ZTUFF\Projects\EDGE\Source\Engine\Resources\Material Resource\MaterialResource.h"
I thought about prepending a macro of the project source code's absolute path to each #include path, but i would like to avoid if possible.
I should mention again, that VC10 never gave me this sort of problem.
Again, this may end up being a simple thing, that i am simply unaware of, since i'm not that much experienced in GCC, and if someone could enlighten me in how to avoid this problem, I'd be quite thankful.
Thanks in advance, and if there's something that is not clear, I'll work to explain it better.