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

Author Topic: Can't fix SFML linker errors[SOLVED]  (Read 2857 times)

0 Members and 2 Guests are viewing this topic.

drinkadriu

  • Newbie
  • *
  • Posts: 5
    • View Profile
Can't fix SFML linker errors[SOLVED]
« on: January 12, 2016, 09:12:21 pm »
hello fellow programmers i found out about sfml 2 weeks ago, and it amazed me with simplicity and efficiencie, today i installed VS2013 Community version and i wanted to install SFML 2.3.2.I used the tutorial on the official sfml page, i did every step right, everything and my code doesn't have compilier errors, it has linker errors, i searched but i couldn't find a solution, i get these errors:


Error   1   error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)   c:\Users\drin-_000\documents\visual studio 2013\Projects\SFMLGAME\SFMLGAME\Main.obj   SFMLGAME
Error   2   error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)   c:\Users\drin-_000\documents\visual studio 2013\Projects\SFMLGAME\SFMLGAME\Main.obj   SFMLGAME
Error   3   error LNK1120: 2 unresolved externals   c:\Users\drin-_000\documents\visual studio 2013\Projects\SFMLGAME\Debug\SFMLGAME.exe   1   1   SFMLGAME

i have no idea whatsoever what to do, please help me !
« Last Edit: January 19, 2016, 10:37:15 pm by drinkadriu »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Can't fix SFML linker errors
« Reply #1 on: January 13, 2016, 02:04:45 am »
You most likely defined SFML_STATIC even though you're linking SFML dynamically. You need to follow the tutorial by word not just by image. ;)

Also you should just upgrade to VS2015 Community while you're at it.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

drinkadriu

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Can't fix SFML linker errors
« Reply #2 on: January 17, 2016, 03:02:53 pm »
You most likely defined SFML_STATIC even though you're linking SFML dynamically. You need to follow the tutorial by word not just by image. ;)

Also you should just upgrade to VS2015 Community while you're at it.

lol i should've read the instructions carefully, minutes after i posted this i fixed it but i couldnt remove this post.. But still thanks

 

anything