Jump to content

  • Log In with Google      Sign In   
  • Create Account


Error In Lesson 1


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Overloaded   Members   -  Reputation: 170

Like
0Likes
Like

Posted 21 May 2012 - 11:37 AM

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.

Edited by D4RknEZz, 21 May 2012 - 11:38 AM.

Currently learning C++

Sponsor:

#2 jamby   Members   -  Reputation: 147

Like
1Likes
Like

Posted 21 May 2012 - 11:43 AM

You need to link to the OpenGL libraries. Check the other tutorials you did that worked and do the same for this one.

#3 Overloaded   Members   -  Reputation: 170

Like
0Likes
Like

Posted 21 May 2012 - 11:58 AM

Oh thanks. The problem was that I had to include glut.h too...
Currently learning C++




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS