Error of "GL_HISTOGRAM was not declared?

Started by
4 comments, last by V-man 14 years ago
My OpenGL program at Windows platform does include <gl.h> and <glext.h>, but it comes with an error of "GL_HISTOGRAM was not declared"? Is is correct? Or some other headers should include to avoid this issue? Tks.
Advertisement
Try using GLEW, it should manage to define that.

Cheers,
Gzaloprgm
In tangent space no one can hear you scream
It's declared in the official glext.h
http://www.opengl.org/registry/api/glext.h
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Thanks. I included as below :
==========================================================
#define GLUT_DISABLE_ATEXIT_HACK

#include "glew/glew.h"

//#include "gl/gltools.h"
#include "gl/math3d.cpp"
#include "gl/glut.h"
#include "gl/torus.c"
#include "gl/vectormath.c"

#include "gl/glext.h"
#include "gl/gltools.cpp"

#include <stdio.h>
#include <stdlib.h>
=========================================================
The error was changed to "undefined reference to '_imp___glewHistogram'. Any suggestion to fix it? Tks.
Thanks. I included as below :
==========================================================
#define GLUT_DISABLE_ATEXIT_HACK

#include "glew/glew.h"

//#include "gl/gltools.h"
#include "gl/math3d.cpp"
#include "gl/glut.h"
#include "gl/torus.c"
#include "gl/vectormath.c"

#include "gl/glext.h"
#include "gl/gltools.cpp"

#include <stdio.h>
#include <stdlib.h>
=========================================================
The error was changed to "undefined reference to '_imp___glewHistogram'. Any suggestion to fix it? Tks.
Sounds like a linker issue. I suggest that you link with the dynamic librray glew32.lib instead of the static library glew32s.lib
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement