SFML community forums

Help => General => Topic started by: Sakurazaki on June 06, 2013, 02:40:49 am

Title: [Solved] OpenGL Failing on compile
Post by: Sakurazaki on June 06, 2013, 02:40:49 am
Hello there,

I've got several classes using #include <SFML/OpenGL.hpp> but when compiling I get 19 linking errors:

1>AABB.obj : error LNK2001: unresolved external symbol __imp__glVertex2f@8
1>AABB.obj : error LNK2001: unresolved external symbol __imp__glEnd@0
1>AABB.obj : error LNK2001: unresolved external symbol __imp__glBegin@4
1>Color3f.obj : error LNK2001: unresolved external symbol __imp__glColor3f@12
1>ConvexHull.obj : error LNK2001: unresolved external symbol __imp__glVertex3f@12
1>ConvexHull.obj : error LNK2001: unresolved external symbol __imp__glTranslatef@12
1>EmissiveLight.obj : error LNK2001: unresolved external symbol __imp__glColor4f@16
1>EmissiveLight.obj : error LNK2001: unresolved external symbol __imp__glPopMatrix@0
1>EmissiveLight.obj : error LNK2001: unresolved external symbol __imp__glPushMatrix@0
1>EmissiveLight.obj : error LNK2001: unresolved external symbol __imp__glRotatef@16
1>EmissiveLight.obj : error LNK2001: unresolved external symbol __imp__glTexCoord2i@8
1>Light.obj : error LNK2001: unresolved external symbol __imp__glOrtho@48
1>Light.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4
1>Light.obj : error LNK2001: unresolved external symbol __imp__glViewport@16
1>Light.obj : error LNK2001: unresolved external symbol __imp__glEnable@4
1>Light.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
1>LightSystem.obj : error LNK2001: unresolved external symbol __imp__glColor4b@16
1>LightSystem.obj : error LNK2001: unresolved external symbol __imp__glDisable@4
1>LightSystem.obj : error LNK2001: unresolved external symbol __imp__glBlendFunc@8

Everything seems to be something about OpenGL.

I'm using SFML 2.0 + SFGUI + C++11 on MSVS2012.
I'm  using Release configuration with SFML included folder and libraries, using the proper libs and proper dlls.

Am I missing something?

Thanks!
Title: Re: OpenGL Failing on compile
Post by: FRex on June 06, 2013, 02:47:11 am
Did you link to opengl?
Title: Re: OpenGL Failing on compile
Post by: Sakurazaki on June 06, 2013, 03:05:16 am
Did you link to opengl?

Edit: No I haven't. Which are the libs and dlls I have to include? Are there listed anywhere?

Thanks!
Title: Re: OpenGL Failing on compile
Post by: FRex on June 06, 2013, 03:10:50 am
http://www.sfml-dev.org/tutorials/2.0/window-opengl.php#including-and-linking-opengl-to-your-application
Title: Re: OpenGL Failing on compile
Post by: Sakurazaki on June 06, 2013, 12:06:56 pm
Done thanks :)