Multitexture problem!

I think that this message is indicated to this topic, bcse I am beggining!

Here I am! Trying to compile an example code that come with the “OpenGL Game Programming Book”!

My problem is a program that uses multitexturing, but it dont´t work.

This error happen´s when I try to compile:

c:\Documents and Settings\multipassex\main.cpp(50): error C2501: ‘PFNGLMULTITEXCOORD2FARBPROC’ : missing storage-class or type specifiers

c:\Documents and Settings\multipassex\main.cpp(50): error C2501: ‘PFNGLMULTITEXCOORD2FARBPROC’ : missing storage-class or type specifiers

c:\Documents and Settings\multipassex\main.cpp(52): error C2501: ‘PFNGLCLIENTACTIVETEXTUREARBPROC’ : missing storage-class or type specifiers

The compiler not recognize the pointer to extended funcions of opengl.

I am including in my project the headers

#include <gl/gl.h> // standard OpenGL include
#include <gl/glu.h> // OpenGL utilties
#include “glext.h”
// OpenGL extension

and the libs:

opengl32.lib and glu32.lib

Any idea that what is my problem?

Thank you!!!

Please do not crosspost.

These are function pinter typedefs declared in glext.h so you can fill them in with wglgetprocaddress and still use them with argument checking.

I suspect you have an old glext.h file or something is wrong with including it. Are you sure these are the first errors?

Check the typedefs carefully and your use of these function pointer types.

You can also use void function pointers and/or your own declaratiosn with casts but that’s just an interim suggestion if you’re feeling adventurous.

I did two tests. At firs I try to compile my program on Windows XP. And it works.

But in my machine that runs windows NT. it don´t works…Any idea?

Here is my code:

http://www.inf.pucrs.br/lfraga/OpenGl%20Project.zip

Thank you!

Sometimes, beeing clear allows other not forcing themselves to guess what the problem could be…

What does not work ?? The compilation ? The linking ? The execution ? Did you install your card drivers ? Did you ensure you have everything intended for things to run ?

If you read the message that I was send before…

I describe my problem in details:

The problem happens when I compile the code.

This error happen´s when I try to compile:

c:\Documents and Settings\multipassex\main.cpp(50): error C2501: ‘PFNGLMULTITEXCOORD2FARBPROC’ : missing storage-class or type specifiers

c:\Documents and Settings\multipassex\main.cpp(50): error C2501: ‘PFNGLMULTITEXCOORD2FARBPROC’ : missing storage-class or type specifiers

c:\Documents and Settings\multipassex\main.cpp(52): error C2501: ‘PFNGLCLIENTACTIVETEXTUREARBPROC’ : missing storage-class or type specifiers

Here is my code:

http://www.inf.pucrs.br/lfraga/OpenGl%20Project.zip

Indeed, that’s what you said in your first post, but not in the second:

But in my machine that runs windows NT. it don´t works…Any idea?

Am I expecting it is the same error than the previous ??

Try to see if your GL libraries and headers are up to date. I can’t see any other things.

Yes! The error that I describe in the first message is the same and occurs only on Windows NT. My GL libraries and headers are up date.
I put the libraries in my gl folder of my Visual Studion .Net.

But to me it is a mistery! Why my program works on Windows XP and don´t works on Windows NT?

c:\Documents and Settings\multipassex\main.cpp(50): error C2501: ‘PFNGLMULTITEXCOORD2FARBPROC’ : missing storage-class or type specifiers

c:\Documents and Settings\multipassex\main.cpp(50): error C2501: ‘PFNGLMULTITEXCOORD2FARBPROC’ : missing storage-class or type specifiers

c:\Documents and Settings\multipassex\main.cpp(52): error C2501: ‘PFNGLCLIENTACTIVETEXTUREARBPROC’ : missing storage-class or type specifiers

What version of GL do you have on NT ? (glGetString (GL_VERSION))

That doesn’t have anything to do with the error…

You said you copied the newest headers in your GL directory. Then you should #include <GL/glext.h>, instead of #include “glext.h”.

Just to be sure, download the latest glext.h from the extension registry.

Btw. multitexture is in GL core since version 1.2. You should use the core functions, not the ARB ones…

I know it! Firt I test using <gl/glext.h>

How my program don´t work, I put the newest glext.h into my program directory.

Again don´t work. I think that is a problem with the windows 2000. Because I test the same program in another machine with windows XP and compiled normaly.

So, I don´t understand Why?

Any, environment variable is missing?

If it is Windows 2000 it has to run. I knew some had problems with NT 4 at that time but there’s absolutely no problem with W2K.