User forums > Help
Codeblocks CC isn't looking up nested include files.
indigo0086:
That works of course, but the thing is, that's not how it used to work. Here's a snippet of code from the glfw header
--- Code: ---// -------------------- END SYSTEM/COMPILER SPECIFIC ---------------------
// Include standard OpenGL headers: GLFW uses GL_FALSE/GL_TRUE, and it is
// convenient for the user to only have to include <GL/glfw.h>. This also
// solves the problem with Windows <GL/gl.h> and <GL/glu.h> needing some
// special defines which normally requires the user to include <windows.h>
// (which is not a nice solution for portable programs).
#if defined(__APPLE_CC__)
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
--- End code ---
Shouldn't the CC look into the header and see the included files and parse them appropriately? I am saying it worked before, but recently I noticed it does not. I put it up as a big but could hardly explain it as I can here.
Keyla:
I think the thing is that "" and <> are different paths, aren't they?
First one is for absolute paths within you project dir and secondone is for searchpath. Or am I wrong?
MortenMacFly:
--- Quote from: Keyla on September 06, 2007, 07:48:44 pm ---Or am I wrong?
--- End quote ---
No, it also works for me with <>. The reason is another, most likely related to the #define wrapper which cannot be resolved at that point so CC skips this section.
With regards, Morten.
indigo0086:
Ok, I just modified the glfw header file to comment out the entire header and just put them all local, no sense bothering I guess, but the block was the main problem.
mandrav:
Just as a reference to those interested (and not willing to dig through our svn changelog or code):
--- Code: ---#if defined(__APPLE_CC__)
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
--- End code ---
The C++ parser in these cases always follows the code inside #if/ifdef/ifndef and skips the #else part. A special case to be considered later is "#if 0" which will force the parser to follow the #else branch instead.
Navigation
[0] Message Index
[*] Previous page
Go to full version