PDA

View Full Version : GLext / QT make error



ben ivc
06-25-2009, 10:45 AM
I'm trying to compile a QT program on SuSE linux (Qt 4.3, Suse 10.3, NVidia drivers 180.22, OpenGL 2.1.2). I run the following code to generate the make files:

qmake -project -unix -after "QT += opengl"
qmake pathing.pro
make

the following error I get upon the make:

error: 'glPointParameterf' was not declared in this scope

the includes in the offending file are:

#include <GL/gl.h>
#include <GL/glext.h>

#include <QGLWidget>
#include <QKeyEvent>
#include <cmath>

The problem seems similar to this forum post (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&amp;Number=204372), but I have worked through that post and still have the same problem. I would appreciate any help or clarifications anyone could provide me, as I'm kinda at wit's end.

Thanks a lot for helping out.

kRogue
07-10-2009, 08:18 AM
new nVidia drivers need to have GL_GLEXT_PROTOTYPES defined when glext.h is included to get the function prototypes in glext.h that are not in gl.h.

ben ivc
07-21-2009, 03:06 PM
That's what I needed, thanks a lot.
Just to clarify for anyone in the future, I changed the offending file to:


#define GL_GLEXT_PROTOTYPES 1
#include <GL/gl.h>
#include <GL/glext.h>

#include <QGLWidget>
#include <QKeyEvent>
#include <cmath>