Multitexturing

I am using GameTutorials.com’s terrain multitexturing tutorial, and i copy and pasted the stuff i needed, but when i compiled, i get this error:
--------------------Configuration: lesson1 - Win32 Debug--------------------
Linking…
Lesson1.obj : error LNK2001: unresolved external symbol “void (__stdcall* glMultiTexCoord2fARB)(unsigned int,float,float)” (?glMultiTexCoord2fARB@@3P6GXIMM@ZA)
Lesson1.obj : error LNK2001: unresolved external symbol “void (__stdcall* glActiveTextureARB)(unsigned int)” (?glActiveTextureARB@@3P6GXI@ZA)
Debug/lesson1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

lesson1.exe - 3 error(s), 0 warning(s)

WHAT DID I MISS???

thanks!

http://nomad.openglforums.com/part15.html

i tried that website, but his sourcecode is messey!

can you please explain waht you need to declar before you do the other stuff!?!?

you need to get the function pointer as they are extensions, this PFNGLMULTITEXARB… stuff.

i have that!

You’re using two variables that are not declared.

I think I found the tutorial you used. In main.h you probably copied this:
// Here are the multitexture function prototypes
typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum target);

// Here we extern our function pointers for multitexturing capabilities
extern PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;
extern PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;

Notice the function pointers are extern. You must have forgot to copy the declarations of those two variables in main.cpp:

// Our function pointers for the ARB multitexturing functions
PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB = NULL;
PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;

Add those two in one of your cpp files and you should be ok.