PDA

View Full Version : linker errors need help C++



bansheeogl
06-06-2005, 10:36 PM
--------------------Configuration: core - Win32 Debug--------------------
Linking...
core.obj : error LNK2001: unresolved external symbol _glutPostRedisplay@0
core.obj : error LNK2001: unresolved external symbol _glutSwapBuffers@0
core.obj : error LNK2001: unresolved external symbol "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
core.obj : error LNK2001: unresolved external symbol _glutMainLoop@0
core.obj : error LNK2001: unresolved external symbol _glutKeyboardFunc@4
core.obj : error LNK2001: unresolved external symbol "void __cdecl CheckKeys(unsigned char,int,int)" (?CheckKeys@@YAXEHH@Z)
core.obj : error LNK2001: unresolved external symbol _glutReshapeFunc@4
core.obj : error LNK2001: unresolved external symbol "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
core.obj : error LNK2001: unresolved external symbol _glutDisplayFunc@4
core.obj : error LNK2001: unresolved external symbol "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
core.obj : error LNK2001: unresolved external symbol _glutCreateWindow@4
core.obj : error LNK2001: unresolved external symbol _glutInitWindowSize@8
core.obj : error LNK2001: unresolved external symbol _glutInitDisplayMode@4
core.obj : error LNK2001: unresolved external symbol _glutInit@8
Debug/core.exe : fatal error LNK1120: 14 unresolved externals
Error executing link.exe.

core.exe - 15 error(s), 0 warning(s)

maybe my glut header is old or something??

it says its from 2003 and its 20.844bytes
glut.h

maybe the header is not the problem!!??
its not my code i got it from someone but ive been getting the same or similar linker errors on other sources too seems like its something to do with glut help please!

mikael_aronsson
06-06-2005, 10:45 PM
Hi !

You must add the glut import library to your project, under linker/input you can add import libraries, just add glut.lib (or if it is glut32.lib, not sure).

Mikael

jide
06-07-2005, 01:34 AM
download the latest glut libraries. They are available at this page:

http://www.opengl.org/resources/libraries/glut/glut_downloads.html