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

Author Topic: cant compile, linker error  (Read 2014 times)

0 Members and 1 Guest are viewing this topic.

tonyv82

  • Newbie
  • *
  • Posts: 2
    • View Profile
cant compile, linker error
« on: April 21, 2016, 07:23:01 pm »
hi,

i have only one line from sfml in my code:
return (sf::TcpSocket().connect(address, port) == sf::Socket::Done);

and i get:
1>MyForm.obj : error LNK2020: unresolved token (0A000674) "public: static class sf::Time const sf::Time::Zero" (?Zero@Time@sf@@2V12@B)
1>MyForm.obj : error LNK2001: unresolved external symbol "public: static class sf::Time const sf::Time::Zero" (?Zero@Time@sf@@2V12@B)

i'm using visual studio 14 and i added in:
project properties -> debug-> linker-> input:
ws2_32.lib
sfml-system-d.lib
sfml-window-d.lib
sfml-network-d.lib
sfml-audio-d.lib
sfml-graphics-d.lib

what am i missing?

thanks for the help...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
Re: cant compile, linker error
« Reply #1 on: April 21, 2016, 07:30:08 pm »
Sounds like you defined SFML_STATIC but you're linking SFML dynamically.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

tonyv82

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: cant compile, linker error
« Reply #2 on: April 21, 2016, 11:29:06 pm »
Sounds like you defined SFML_STATIC but you're linking SFML dynamically.

thank you! that solved it