c++ - opengl
- steve (68/68) Jan 24 2009 Hello the opengl\windows sample "gengl" compiles but it wont link
- Walter Bright (9/19) Jan 24 2009 The symbol _wglDeleteContext@4 is not found by the linker. So where is
Hello the opengl\windows sample "gengl" compiles but it wont link and comes up with errors like sc gengl.c -mn -C -WA -S -3 -a8 -c -w- -w2 -g -I. -o.\gengl.obj sc render.c -mn -C -WA -S -3 -a8 -c -w- -w2 -g -I. -o.\render.obj rcc -32 -I. -o.\gengl.res gengl.rc link /CO /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /VERS:1.0 /BAS: 1048576 /A:512 /RC :.\gengl.RES GENGL.LNK Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\gengl.OBJ (gengl) (18868632): Symbol Undefined _wglDeleteContext 4 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\gengl.OBJ (gengl) : Symbol Undefined _wglMakeCurrent 8 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\gengl.OBJ (gengl) : Symbol Undefined _wglGetCurrentDC 0 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\gengl.OBJ (gengl) (1296632): Symbol Undefined _wglGetCurrentContext 0 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\gengl.OBJ (gengl) (1296636): Symbol Undefined _wglCreateContext 4 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) : Symbol Undefined _glPopMatrix 0 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) : Symbol Undefined _glEnd 0 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296640): Symbol Undefined _glVertex3f 12 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296640): Symbol Undefined _glColor3f 12 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) : Symbol Undefined _glBegin 4 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296636): Symbol Undefined _glTranslatef 12 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296636): Symbol Undefined _glPushMatrix 0 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296632): Symbol Undefined _gluDeleteQuadric 4 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296636): Symbol Undefined _gluCylinder 36 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296632): Symbol Undefined _gluQuadricNormals 8 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296632): Symbol Undefined _gluQuadricDrawStyle 8 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296636): Symbol Undefined _gluNewQuadric 0 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) : Symbol Undefined _glViewport 16 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) : Symbol Undefined _glFinish 0 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) : Symbol Undefined _glClear 4 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296636): Symbol Undefined _glMatrixMode 4 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296636): Symbol Undefined _gluPerspective 32 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296640): Symbol Undefined _glEnable 4 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296636): Symbol Undefined _glClearDepth 8 Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\render.OBJ (render) (1296636): Symbol Undefined _glClearColor 16 Lines Processed: 251650 Errors: 25 Warnings: 0 Build failed which is the same for mine ... im kind of a newbie but ive always been able to have successful builds in other compilers and I purchased the cd version of dmc.... very frustrating... any comments or suggestions would be appreciated. Thanks == Repost the article of steve (stewilled msn.com) == Posted at 2009/01/23 22:19 to c++ Does anyone know how to get opengl\windows source to compile. Any advice would be welcomed.Thanks
Jan 24 2009
steve wrote:Hello the opengl\windows sample "gengl" compiles but it wont link and comes up with errors like sc gengl.c -mn -C -WA -S -3 -a8 -c -w- -w2 -g -I. -o.\gengl.obj sc render.c -mn -C -WA -S -3 -a8 -c -w- -w2 -g -I. -o.\render.obj rcc -32 -I. -o.\gengl.res gengl.rc link /CO /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /VERS:1.0 /BAS: 1048576 /A:512 /RC :.\gengl.RES GENGL.LNK Error: I:\dmc\dm\samples\WIN32\OPENGL\DEMOS\GENGL\.\gengl.OBJ (gengl) (18868632): Symbol Undefined _wglDeleteContext 4The symbol _wglDeleteContext 4 is not found by the linker. So where is it? The easiest way to find it is to use grep: cd \dm\lib grep _wglDeleteContext 4 *.lib GLAUX.LIB:.__imp__wglDeleteContext 4 OPENGL32.LIB:._wglDeleteContext 4.OPENGL32.wglDeleteContext OPENGL32.LIB:_glVertex2f 8..._wglDeleteContext 4t.._wglRealizeLayerPalette 12.. Looks like it's in \dm\lib\opengl32.lib, so add that to your link command.
Jan 24 2009