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.
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.