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

Author Topic: Starting With OpenGL  (Read 1194 times)

0 Members and 1 Guest are viewing this topic.

azoundria

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
Starting With OpenGL
« on: January 06, 2014, 12:00:42 am »
I am attempting to run the first example on the openGL tutorial.

http://sfml-dev.org/tutorials/2.1/window-opengl.php

I receive errors as follows:

Quote
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

I believe there is a file named opengl32.lib that I have to do something with. Some of the guides tell me the location, so maybe I need to copy it to my project? Some tell me things about other libraries like glu and ones I obviously don't need like glut. And finally there are a few tutorials telling me that I can put a linker option (which I assume goes in Linker command line options). Nothing I try is working and I'm getting very frustrating and I have over a hundred tabs of tutorials I've tried and I don't know why this is so complicated.

I am using Microsoft Visual C++ 2010.

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Starting With OpenGL
« Reply #1 on: January 06, 2014, 12:03:21 am »
I guess you forgot to link against "opengl32.lib"? If so, add it to the linker settings the same way you added the sfml-libs


AlexAUT

 

anything