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

Author Topic: Linking Problem with SFML/Visual Studio  (Read 1217 times)

0 Members and 1 Guest are viewing this topic.

jerryd

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Linking Problem with SFML/Visual Studio
« on: May 24, 2017, 04:47:10 am »
SFML forum,

 SFML 2.4.2   Visual Studio 2017

 I'm trying to link SFML to Visual Studio. I have followed all the
 steps in https://www.sfml-dev.org/tutorials/2.4/start-vc.php.
 Everything links and compiles until I put this line in my program:

 sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");

 Then I get errors like:

 Error LNK2019 unresolved external symbol "public: __thiscall
 sf::String::String(char const *,class std::locale const &)"
 (??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main
 unresolved external symbol "public:_thiscall sf::VideoMode::VideoMode(
 unsigned int,unsigned)

 Note that the line #include <SFML/Graphics.hpp> causes no errors.

 Must be a linking error but I have double checked everything and
 SFML_STATIC is assigned.

Any suggestions?
jerryd



eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: Linking Problem with SFML/Visual Studio
« Reply #1 on: May 24, 2017, 04:50:59 pm »
Since you set SFML_STATIC, are you also linking SFML statically? And SFML's dependencies?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything