PDA

View Full Version : OpenGL Linking error



991060
07-19-2004, 07:09 PM
Hi all:
I have a program with these headers:

#include <windows.h>
#include <stdio.h>
#include <iostream>

#include <GL/glut.h>
#undef GL_GLEXT_PROTOTYPES
#include <GL/glext.h>
#include <GL/GLAux.h>

#include <glh/glh_extensions.h>
#include <nv_manip/nv_manip.h>
#include <nv_math/nv_math.h>
#include <quitapp.h>


#include <cg/cg.h>
#include <cg/cggl.h>
And I have already added opengl32.lib, glu32.lib, glut32.lib, glaux.lib cg.lib and cgGL.lib in the linker, but I still got these errors when linking:

WaterDemo.obj : error LNK2001: unresolved external symbol _wglDestroyPbufferARB
WaterDemo.obj : error LNK2001: unresolved external symbol _wglReleasePbufferDCARB
WaterDemo.obj : error LNK2001: unresolved external symbol _wglQueryPbufferARB
WaterDemo.obj : error LNK2001: unresolved external symbol _wglGetPbufferDCARB
WaterDemo.obj : error LNK2001: unresolved external symbol _wglCreatePbufferARB
WaterDemo.obj : error LNK2001: unresolved external symbol _wglChoosePixelFormatARB
WaterDemo.obj : error LNK2001: unresolved external symbol _wglReleaseTexImageARB
WaterDemo.obj : error LNK2001: unresolved external symbol _wglBindTexImageARB
WaterDemo.obj : error LNK2001: unresolved external symbol _glActiveTextureARB
WaterDemo.obj : error LNK2019: unresolved external symbol _glh_get_unsupported_extensions referenced in function "void __cdecl init(void)" (?init@@YAXXZ)
WaterDemo.obj : error LNK2019: unresolved external symbol _glh_init_extensions referenced in function "void __cdecl init(void)" (?init@@YAXXZ)
Can anyone help me out? I really dont know what to do.

mikael_aronsson
07-19-2004, 08:24 PM
Hi !

The functions you list are not part of OpenGL 1.1 and are not part of opengl32.lib (this import library comes with windows), to use these functions you need an import library that has them included or use another way to access the extended functions.

There are a number of ways to solve this and if you search this forum you will find lots of information about it.

Mikael

991060
07-20-2004, 12:06 AM
yep, I already managed to get the code work. :D