I’m trying to compile this C++ program which utilizes the GLUT32 libraries.
Right now I’m getting the following errors:
Error 1 error LNK2001: unresolved
external symbol
_gluPerspective@32 Camera.obj soundCube
Error 2 error LNK2001: unresolved
external symbol
_gluLookAt@72 Camera.obj soundCube Error 3 error LNK2001: unresolved
external symbol
__imp__glMaterialfv@12 GLWindow.obj soundCube
Error 4 error LNK2001: unresolved
external symbol
__imp__glClear@4 GLWindow.obj soundCube Error 5 error LNK2001: unresolved
external symbol
__imp__glClearColor@16 GLWindow.obj soundCube
Error 6 error LNK2001: unresolved
external symbol
__imp__glMaterialf@12 GLWindow.obj soundCube Error 7 error LNK2001: unresolved
external symbol
__imp__glEnd@0 GLWindow.obj soundCube Error 8 error LNK2001: unresolved
external symbol
__imp__glRasterPos2f@8 GLWindow.obj soundCube
Error 9 error LNK2001: unresolved
external symbol
__imp__timeGetTime@0 GLWindow.obj soundCube Error 10 error LNK2001: unresolved
external symbol
__imp__glDisable@4 GLWindow.obj soundCube
Error 11 error LNK2001: unresolved
external symbol
__imp__glBegin@4 GLWindow.obj soundCube Error 12 error LNK2001: unresolved
external symbol
__imp__glColor4f@16 GLWindow.obj soundCube
Error 13 error LNK2001: unresolved
external symbol
__imp__glPopMatrix@0 GLWindow.obj soundCube Error 14 error LNK2001: unresolved
external symbol
__imp__glPushMatrix@0 GLWindow.obj soundCube Error 15 error LNK2001: unresolved
external symbol
__imp__glRotatef@16 GLWindow.obj soundCube
Error 16 error LNK2001: unresolved
external symbol __imp__glBlendFunc@8…
Error 56 fatal error LNK1120: 55
unresolved
externals C:\Users\Simucal\Documents\Downloads\SoundCubeSrc soundCube
I’m not that experienced in C++ but I’ve tried to set up GLUT correctly so this project can link against it.
I downloaded the GLUT32 library for Nate Robin’s page.
I then placed the following files in:
- glut.h – C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\gl
- glut32.lib – C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
- glut.dll – C:\Windows\System32
I also selected the Project -> Properties -> Linker -> Additional Dependencies -> Added “glut32.lib”
If anyone wants to see what project I’m working with, it is here.
What step am I missing or doing wrong in order to resolve these errors?
The unresolved symbols are from the GL and GLU libraries. You need to add the link libraries for them as well.