PDA

View Full Version : Including GLEE after GLUT



David Doria
11-19-2008, 10:21 AM
I have many source files which include glut.h that I compile and link to in my makefile. The problem is, when I try to include GLee.h in my "main" source file, it complains

error: #error gl.h included before glee.h

Is there any way to fix this without going back and including glee everywhere I include glut?

Thanks,
Dave

Brolingstanz
11-21-2008, 06:26 AM
You could, say, create a header that includes everything in the right order, then include that everywhere.

_NK47
12-09-2008, 08:09 AM
you could hack your way through. before including GLEE undef the __GL_H__ define kindof. beware! hacky solution but should work.

#ifdef __GL_H__
#undef __GL_H__
#endif

otherwise just use your IDE's find and replace feature to change include strings.

dletozeun
12-16-2008, 03:51 PM
You don't need a hack, everywhere you need glut, just include glee before. This way, you are sure that glee is included before glut.