like_gobeawan
03-08-2003, 08:22 AM
hi,
my opengl program compiles fine, but getting linking error like the following
=========================================
--------------------Configuration: hello - Win32 Debug--------------------
Compiling...
hello.c
Linking...
hello.obj : error LNK2001: unresolved external symbol _glFlush
hello.obj : error LNK2001: unresolved external symbol _glEnd
hello.obj : error LNK2001: unresolved external symbol _glVertex3f
hello.obj : error LNK2001: unresolved external symbol _glBegin
hello.obj : error LNK2001: unresolved external symbol _glColor3f
hello.obj : error LNK2001: unresolved external symbol _glClear
hello.obj : error LNK2001: unresolved external symbol _glOrtho
hello.obj : error LNK2001: unresolved external symbol _glLoadIdentity
hello.obj : error LNK2001: unresolved external symbol _glMatrixMode
hello.obj : error LNK2001: unresolved external symbol _glClearColor
hello.obj : error LNK2001: unresolved external symbol _glutMainLoop
hello.obj : error LNK2001: unresolved external symbol _glutDisplayFunc
hello.obj : error LNK2001: unresolved external symbol _glutInitWindowPosition
hello.obj : error LNK2001: unresolved external symbol _glutInitWindowSize
hello.obj : error LNK2001: unresolved external symbol _glutInitDisplayMode
hello.obj : error LNK2001: unresolved external symbol ___glutInitWithExit
hello.obj : error LNK2001: unresolved external symbol ___glutCreateWindowWithExit
Debug/hello.exe : fatal error LNK1120: 17 unresolved externals
Error executing link.exe.
hello.exe - 18 error(s), 0 warning(s)
=============================================
eventhough i have set the project setting library linking with opengl32.lib, glut32.lib, and glu32.lib; then included glut.h and gl.h already in the program. i also tried the #pragma line in the code, but all didn't work.
last time, it works fine on win98 platform, but now on win xp, it's not! http://www.opengl.org/discussion_boards/ubb/frown.gif
anyone can help me ? thx a lot!
my opengl program compiles fine, but getting linking error like the following
=========================================
--------------------Configuration: hello - Win32 Debug--------------------
Compiling...
hello.c
Linking...
hello.obj : error LNK2001: unresolved external symbol _glFlush
hello.obj : error LNK2001: unresolved external symbol _glEnd
hello.obj : error LNK2001: unresolved external symbol _glVertex3f
hello.obj : error LNK2001: unresolved external symbol _glBegin
hello.obj : error LNK2001: unresolved external symbol _glColor3f
hello.obj : error LNK2001: unresolved external symbol _glClear
hello.obj : error LNK2001: unresolved external symbol _glOrtho
hello.obj : error LNK2001: unresolved external symbol _glLoadIdentity
hello.obj : error LNK2001: unresolved external symbol _glMatrixMode
hello.obj : error LNK2001: unresolved external symbol _glClearColor
hello.obj : error LNK2001: unresolved external symbol _glutMainLoop
hello.obj : error LNK2001: unresolved external symbol _glutDisplayFunc
hello.obj : error LNK2001: unresolved external symbol _glutInitWindowPosition
hello.obj : error LNK2001: unresolved external symbol _glutInitWindowSize
hello.obj : error LNK2001: unresolved external symbol _glutInitDisplayMode
hello.obj : error LNK2001: unresolved external symbol ___glutInitWithExit
hello.obj : error LNK2001: unresolved external symbol ___glutCreateWindowWithExit
Debug/hello.exe : fatal error LNK1120: 17 unresolved externals
Error executing link.exe.
hello.exe - 18 error(s), 0 warning(s)
=============================================
eventhough i have set the project setting library linking with opengl32.lib, glut32.lib, and glu32.lib; then included glut.h and gl.h already in the program. i also tried the #pragma line in the code, but all didn't work.
last time, it works fine on win98 platform, but now on win xp, it's not! http://www.opengl.org/discussion_boards/ubb/frown.gif
anyone can help me ? thx a lot!