View Full Version : newbie (stupid) question

01-12-2004, 11:17 PM
hi all,
i have a puzzling problem:
i am tring to write a small vertex/fragment shader, so i am using the *_PROGRAM_ARB stuff.
i included the glext.h file (and i downloaded the latest release from the oss site). Still when i tri to compile&link my program it keeps me sayng:

[enrico@client4 render]$ make
g++ -g -c eptagon.cpp
eptagon.cpp: In function `GLuint load_program(char*, unsigned int)':
eptagon.cpp:94: `GL_FRAGMENT_PROGRAM_ARB' undeclared (first use this function)
eptagon.cpp:94: (Each undeclared identifier is reported only once for each
function it appears in.)
eptagon.cpp:98: `glGenProgramsARB' undeclared (first use this function)
eptagon.cpp:100: `glBindProgramARB' undeclared (first use this function)
eptagon.cpp:103: `glProgramStringARB' undeclared (first use this function)
make: *** [eptagon.o] Error 1

now where am i wrong? All glSomethingARB functions should be declared/defined in glext.h, right? What else am I missing? I am including glut.h too (and just to be safe gl.h and glu.h).
If anyone has some hints, lemme know. Thanks for the help, bye

01-13-2004, 12:25 AM
Are you sure that you have the newest glext.h?

Try download this own, should include ARB_vertex_program and ARB_fragment_program:

01-13-2004, 12:39 AM
thanks for the advice, corral,
anyway i already had the latest glext.h

however i solved the problem adding a


before any other #include in my program, so now it look like:

#include <stdio.h>


#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <stdlib.h>
#include "glext.h"
#include <string.h>
#include "eptagon.h"

the only thing i can't understand yet is why it won't read the definition of

GL_FRAGMENT_PROGRAM_ARB from the glext file.
I have to define it explicity in my code.
Thanks again and bye!