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

Author Topic: error LNK2001: unresolved external symbol "public: static class sf::RenderStates  (Read 4490 times)

0 Members and 2 Guests are viewing this topic.

MadKnight

  • Newbie
  • *
  • Posts: 1
    • View Profile
i linked all the sfml-*-d.lib files, but it still can't find sf::RenderStates::Default and sf::Color::(anyColorName) (6 error lines) - it finds other stuff except only these few things

it all works in Release config without -d in .lib names, but i need it to work in Debug config

what's wrong? i have the latest sfml version
« Last Edit: May 28, 2016, 09:55:10 am by MadKnight »

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
With this error message, I would presume that you're using Visual Studio.

Make sure that your linking properties are set for each build - debug and release.
It looks like it is the location of the libs that is failing so try, in the project's properties window, changing Configuration between Debug and Release to see if how each are set up. To change both at once, choose All Configurations. Be aware, though, that obviously some things need to be different for debug and release properties so only change to all configurations when you know you want to be changing both.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

JapaneseCurry08

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Hello! This is exactly what happened to my code! Did you solve it as last?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
This usually happens when you declare SFML_STATIC but then don't actually link SFML statically.
Don't define SFML_STATIC if you don't link the SFML libraries with the -s suffix.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything