Glew + QT Problem

Started by
2 comments, last by dhm 18 years, 3 months ago
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?
Advertisement
I would try including <glew.h> above/before any of the QT-headers.
ok, i changed that but unfortunately it doesn´t help...
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.

#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