PDA

View Full Version : glext.h



11-13-2001, 08:35 AM
Having a problems with certain constants
in glext.h.. I have the following

PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;

followed by a few others for multitexturing.
I'm getting compile errors like "missing ;
before glActiveTextureARB" as if PFNGLACTIVETEXTUREARBPROC is undefined..
I used #include "glext.h" with the file in the root of my project dir, but even if i
dont #include it i get the same errors..

anyone have any ideas?

thanks

03-16-2004, 04:28 PM
UP! Same problem!

EraZer
03-17-2004, 02:59 AM
Maybe your implementations of OpenGL don't handle this extension.

Honk
03-17-2004, 03:34 AM
Originally posted by snakes!:
Having a problems with certain constants
in glext.h.. I have the following

PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;

followed by a few others for multitexturing.
I'm getting compile errors like "missing ;
before glActiveTextureARB" as if PFNGLACTIVETEXTUREARBPROC is undefined..
I used #include "glext.h" with the file in the root of my project dir, but even if i
dont #include it i get the same errors..

anyone have any ideas?

thanks


I guess your including files in the wrong order or something like that. It would help if you can post the exact error message along with a code snippet (please use the code tag) and some information about your enviorment (compiler and operating system).

BTW: Since this is a compile time error it has nothing to do with the OpenGL implementation you use.

dvm
03-17-2004, 08:01 AM
I think it's because you have to declare PFNGLACTIVETEXTUREARBPROC *glActiveTextureARB
I mean, create a pointer, not a variable. If this doesn't solve it try posting some code.

Deiussum
03-17-2004, 10:22 AM
Honk is probably on the right track. Either that or, perhaps you have multiple source files and are forgetting to #include "glext.h" in one of them before you use PFNGLACTIVETEXTUREARBPROC.

As Honk said, it's not an implmentation problem because you said you are getting compiler errors. If it was in implementation problem you would have runtime errors. (Page faults, etc.)

It's not what moucard said either. Not only is PFNGLACTIVETEXTUREARBPROC already a typedef to a function pointer, but your error specifically states that it can't find PFNGLACTIVETEXTUREARBPROC, so it obviously wouldn't be able to find PFNGLACTIVETEXTUREARBPROC* any easier.

In any case, for whatever reason, the problem is that PFNGLACTIVETEXTUREARBPROC isn't getting declared before you try to use it. You have to remember that .cpp files are compiled one at a time into object files, and they are compiled top-down, so you have to have things declared or defined before you can use them.