Jump to content
  • Advertisement
Sign in to follow this  
metalcrusader

Glew + QT Problem

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!