Glew + QT Problem
Hi!
I want to write an QT example which should use shaders. Without Shaders ( without any ARB-call) it works. But when i include "glew.h" ( and edit the Makefile: -lGLEW) i got "/usr/include/GL/glew.h:66:2: error: #error gl.h included before glew.h
/usr/include/GL/glew.h:69:2: error: #error glext.h included before glew.h
..."
Does anyone know how i could manage this problem?
Hi,
Presumably you are using a child class of the QT OpenGL widget? And are getting the error in your child class .cpp file?
You should try switching around the order of the #include's.
e.g.
The issued is caused by the QGLWidget header file #includ'ing gl.h so if you have QGLWidget before GLee.h then you will get that error.
Hope that helps,
dhm
Update: Sorry just saw another post saying same thing and you said it didn't help. I would check any other header files that are included do not include gl.h, glu.h, glut.h etc.
Presumably you are using a child class of the QT OpenGL widget? And are getting the error in your child class .cpp file?
You should try switching around the order of the #include's.
e.g.
#include "GLee.h"#include <QGLWidget>
The issued is caused by the QGLWidget header file #includ'ing gl.h so if you have QGLWidget before GLee.h then you will get that error.
Hope that helps,
dhm
Update: Sorry just saw another post saying same thing and you said it didn't help. I would check any other header files that are included do not include gl.h, glu.h, glut.h etc.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement