Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Solved]Having troubles Running the Tutorial Dealing With OpenGl  (Read 3749 times)

0 Members and 1 Guest are viewing this topic.

eighthourblink

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Today I begun working through the tutorials.  Everything was working fine and running smooth until I got to the first OpenGl Tutorial.  I read the tutorial, wrote out the code but when I ran the program, I get the error of not able to start program ---- The System cannot find the file specified.

So i went through the code seeing if i missed anything.  Couldn't find anything wrong. Tried again.  same result.  So I thought to myself maybe if i copy the code that is provided at the end of the tutorial - maybe theres something different. After a copy - paste operation, same result.

Im confused. I set up each project I start the same way, configuring the setting for SFML.  Each other tutorial worked fine, is there an additional library to include for OpenGL. I believe the tutorial said all I need is #include <SFML/Window.hpp>

Heres the Error Code lines :

1>------ Build started: Project: SFMLTut2OpenGl, Configuration: Debug Win32 ------
1>main.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glVertex3f@12 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glRotatef@16 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glTranslatef@12 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _gluPerspective@32 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glMatrixMode@4 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glDepthMask@4 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glClearColor@16 referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol __imp__glClearDepth@8 referenced in function _main
1>C:\Users\HomePC2\Documents\Visual Studio 2010\Projects\SFMLTut2OpenGl\Debug\SFMLTut2OpenGl.exe : fatal error LNK1120: 14 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

« Last Edit: October 28, 2012, 08:52:50 pm by eighthourblink »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Having troubles Running the Tutorial Dealing With OpenGl
« Reply #1 on: October 28, 2012, 08:32:36 pm »
You must link to OpenGL and GLU (opengl32.lib, glu32.lib).
Laurent Gomila - SFML developer

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: Having troubles Running the Tutorial Dealing With OpenGl
« Reply #2 on: October 28, 2012, 08:33:22 pm »
First you must link the OpenGL dll's. And there's the openGL.hpp that works once you have linked openGL.
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!

eighthourblink

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Having troubles Running the Tutorial Dealing With OpenGl
« Reply #3 on: October 28, 2012, 08:40:46 pm »
Am I linking the required files Under Linker > Input?

sorry to sound completely lost, I just need to learn it first


Thanks again for the Help

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Having troubles Running the Tutorial Dealing With OpenGl
« Reply #4 on: October 28, 2012, 08:48:00 pm »
Quote
Am I linking the required files Under Linker > Input?
Yes.
Laurent Gomila - SFML developer

eighthourblink

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Having troubles Running the Tutorial Dealing With OpenGl
« Reply #5 on: October 28, 2012, 08:52:14 pm »
Just added the two required Files and now it works

Thanks Again