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

Author Topic: Error trying to display sprite?  (Read 1337 times)

0 Members and 1 Guest are viewing this topic.

rush905

  • Newbie
  • *
  • Posts: 36
    • View Profile
Error trying to display sprite?
« on: August 21, 2012, 06:11:29 pm »
I'm writing a simple program to open a window, and render a sprite inside that window.

Here is my source:
http://pastebin.com/ndnRyjuf

And this is the error I'm getting:
Error   1   error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)

Thank you in advance!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Error trying to display sprite?
« Reply #1 on: August 21, 2012, 06:20:52 pm »
If you link staticly you have to link against sfml-xyz-s(-d).lib and define SFML_STATIC if you link dynamically you'll have to link against sfml-xyz(-d).lib and not define SFML_STATIC. (It's all written in the tutorial...) ::)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

rush905

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Error trying to display sprite?
« Reply #2 on: August 21, 2012, 06:26:02 pm »
Oh, I was confused as to when to add the "SFML_STATIC" part under Preprocesser. All I had to do was get rid of it. Thank you.

 

anything