   gl.h before glew.h
  So I've got a project where any file (header or source) that needs access to gl.h/glew.h/etc. includes "include_opengl.h":#ifndef INCLUDE_OPENGL_H#define INCLUDE_OPENGL_H#include "GLEW/glew.h"#include <windows.h>#include <GL/gl.h>#include <GL/glu.h>#endifRecently, I started getting this error, though:Quote:Error1fatal error C1189: #error :  gl.h included before glew.he:\dev\projects\growth\growth\repository\glew\glew.h66However, if I add this to my include_opengl.h file, the error goes away and I get the blahblahblah error:#ifndef INCLUDE_OPENGL_H#define INCLUDE_OPENGL_H#if defined(__gl_h_) || defined(__GL_H__)    #error blahblahblah#endif#include "GLEW/glew.h"#include <windows.h>#include <GL/gl.h>#include <GL/glu.h>#endifMy include directories include the boost libraries and also DevIL. Only one file includes DevIL files (which include gl.h and glu.h) - it's a source file, and its header file includes "include_opengl.h", so it shouldn't be the cause of the error.Anyone know what this might be?Cheers.   
  When you put in your #error blahblahblah, it hits this before trying to include "GLEW/glew.h". In one of the files that includes this header you must have already included "GL/gl.h".   ;Quote:Original post by Dr YapWhen you put in your #error blahblahblah, it hits this before trying to include "GLEW/glew.h". In one of the files that includes this header you must have already included "GL/gl.h".Yeah I know - that's pretty much what the error is telling me.I fixed it. I changed this:#include <math.h>#include "include_devil.h"#include "Logger.h"#include "LoggedException.h"#include "GLRenderer.h"To this:#include "GLRenderer.h#include <math.h>#include "include_devil.h"#include "Logger.h"#include "LoggedException.h""For some reason I hadn't included the matching header file at the top of the source file which I always do. "ilut.h" was including some gl header files.Cheers.   