SFML community forums
Help => Window => Topic started by: Rubenknex on November 06, 2010, 06:03:10 pm
-
Hello, I tried compiling the tutorial which uses OpenGL to draw a cube on the screen. However I'm getting a bunch of linker errors which probably indicate that it can't find the OpenGL functions. I thought OpenGL was included by SFML/Window.hpp?
What am I doing wrong :x .
The errors:
1>Main.obj : error LNK2001: unresolved external symbol __imp__glClearDepth@8
1>Main.obj : error LNK2001: unresolved external symbol __imp__glClear@4
1>Main.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
1>Main.obj : error LNK2001: unresolved external symbol __imp__glEnd@0
1>Main.obj : error LNK2001: unresolved external symbol __imp__glBegin@4
1>Main.obj : error LNK2001: unresolved external symbol __imp__glDepthMask@4
1>Main.obj : error LNK2001: unresolved external symbol __imp__glRotatef@16
1>Main.obj : error LNK2001: unresolved external symbol __imp__glVertex3f@12
1>Main.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4
1>Main.obj : error LNK2001: unresolved external symbol __imp__glViewport@16
1>Main.obj : error LNK2001: unresolved external symbol __imp__glTranslatef@12
1>Main.obj : error LNK2001: unresolved external symbol __imp__glEnable@4
1>Main.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
-
It is indeed included by SFML, but not linked. You must link to opengl32.lib.
-
Ah so that's it, it works now :).
I've worked my way through the next few tutorials and SFML seems like an awesome library! :D
-
It is indeed included by SFML, but not linked. You must link to opengl32.lib.
Where is the Lib? I tried going to the linker and just linking it but no luck.
-
Which compiler do you use? I use VC++ 2008 and it can find the opengl32.lib without problems.
-
Where is the Lib? I tried going to the linker and just linking it but no luck.
Please don't duplicate questions. You already have a topic for this problem.
-
Where is the Lib? I tried going to the linker and just linking it but no luck.
Please don't duplicate questions. You already have a topic for this problem.
No that is just one asking how people got to OpenGL and this guy could possibly help me since I have the same errors as him...
-
But you already ask the same question here
http://www.sfml-dev.org/forum/viewtopic.php?p=24137#24137
If you get answers here, people following the other thread won't see them.
-
But you already ask the same question here
http://www.sfml-dev.org/forum/viewtopic.php?p=24137#24137
If you get answers here, people following the other thread won't see them.
Ok sorry, I just thought that this would the thread for this and I would delete my other post so people could find the answer easier istead of looking in where did you start opengl