ERRORS ARE DRIVING ME NUTS

Started by
5 comments, last by dAbIgAzNdUdE 22 years, 8 months ago
hey, eveytime i try to build an opengl program with a spinning triangle on a black background in Visual C++ 5 (sevice pack 3), i get this error message: --------------------Configuration: triangle - Win32 Debug-------------------- Linking... triangle.obj : error LNK2001: unresolved external symbol _gluPerspective@32 triangle.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0 triangle.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4 triangle.obj : error LNK2001: unresolved external symbol __imp__glViewport@16 triangle.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4 triangle.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8 triangle.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4 triangle.obj : error LNK2001: unresolved external symbol __imp__glEnd@0 triangle.obj : error LNK2001: unresolved external symbol __imp__glVertex3f@12 triangle.obj : error LNK2001: unresolved external symbol __imp__glBegin@4 triangle.obj : error LNK2001: unresolved external symbol __imp__glColor3f@12 triangle.obj : error LNK2001: unresolved external symbol __imp__glRotatef@16 triangle.obj : error LNK2001: unresolved external symbol __imp__glTranslatef@12 triangle.obj : error LNK2001: unresolved external symbol __imp__glClear@4 LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/triangle.exe : fatal error LNK1120: 15 unresolved externals Error executing link.exe. triangle.exe - 16 error(s), 0 warning(s) ******Please Help!******
Advertisement
You need to format your hard drive and reinstall Windows.

Wait a minute, no you don''t. What you actually need to do is make sure that you link to opengl32.lib and glu32.lib.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
How do you do that?
RTFM
With VC++ open, go to tools->options, and then hit the directories tab. Here you specify where the linker looks for certain functions and whatnot. Add the directories with opengl32.lib and glu32.lib, should patch you up fine.
In MSVC++, select Project -> Add to project -> Files.

Then select glu32.lib and opengl32.lib from the VC98/lib of your Visual Studio installation.



GAMESDEV.CH

Source d''informations et plate-forme de discussions pour le développement de jeux vidéo
#pragma comment(linker,"/entry:\"mainCRTStartup\"")

This topic is closed to new replies.

Advertisement