Glew + QT Problem

This topic is 4612 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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?

Share on other sites
I would try including <glew.h> above/before any of the QT-headers.

Share on other sites
ok, i changed that but unfortunately it doesn´t help...

Share on other sites
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.

1. 1
2. 2
3. 3
4. 4
frob
11
5. 5

• 11
• 16
• 13
• 20
• 12
• Forum Statistics

• Total Topics
632174
• Total Posts
3004581

×