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

Author Topic: linking libraries  (Read 1442 times)

0 Members and 1 Guest are viewing this topic.

palo

  • Newbie
  • *
  • Posts: 5
    • View Profile
linking libraries
« on: April 10, 2018, 05:53:12 pm »
Okay i have a problem with linking static libraries in codeblocks(TDM-GCC-32). I did exactly what tutorial said, but found out that i have to specifically link other libraries than window,system etc. the problem is i dont know how am i supposed to do that.... I found many topics on that problem but none clearly explains what to do.
error:
"D:\sfml-release\_Sources\SFML\src\SFML\Graphics\RenderTarget.cpp|106|undefined reference to `glClearColor@16'|"

sorry if that's 100th time you're reading about this, I'm already so tired of this ><

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: linking libraries
« Reply #1 on: April 10, 2018, 06:06:52 pm »
When you look at the official tutorial make sure to read the latest version (2.4 currently).

There you'll find a list of all the libraries that need to additionally be linked when linking SFML statically.

Some of them you'll find in the extlibs directory of SFML and some are system libraries that you just need to specify like the SFML libraries and they will be found.

Don't forget that the link order matters.

For the error you mentioned, you didn't link OpenGL.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

palo

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: linking libraries
« Reply #2 on: April 10, 2018, 09:09:28 pm »
Okay, thanks a lot now i it works! :D
What I think was the problem for me, was to understand that where i put "C:\bla\bla\sfml\lib\sfmllib_bla-s-d-a" i can also place simply "opengl32" without any directory or extension.