Error In Lesson 1

Started by
1 comment, last by Overloaded 11 years, 11 months ago
Hello. I followed exactly the tutorial and copied the code into my Visual C++ 2010 Express Compiler. But when I run it it gives me the error: "There are some build errors. Would you like to continue and run the last succesful build?"
Check out the Output:


1>------ Build started: Project: OpenGL TutorialTest, Configuration: Debug Win32 ------
1> Skipping... (no relevant changes detected)
1> main.cpp
1>testin1.obj : error LNK2019: unresolved external symbol __imp__gluPerspective@32 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__glMatrixMode@4 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__glHint@8 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__glDepthFunc@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__glClearDepth@8 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__glClearColor@16 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__glShadeModel@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
1>testin1.obj : error LNK2019: unresolved external symbol __imp__wglCreateContext@4 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z)
1>C:\Users\UserNameHere\Documents\Visual Studio 2010\Projects\OpenGL TutorialTest\Debug\OpenGL TutorialTest.exe : fatal error LNK1120: 14 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Any idea how to fix it? I followed some other OpenGL Tutorials in videos, but they worked fine.

Game Developer at Orama Interactive!

Check out my personal blog too!

Advertisement
You need to link to the OpenGL libraries. Check the other tutorials you did that worked and do the same for this one.
Oh thanks. The problem was that I had to include glut.h too...

Game Developer at Orama Interactive!

Check out my personal blog too!

This topic is closed to new replies.

Advertisement