SFML community forums

Help => General => Topic started by: jerryd on May 24, 2017, 04:47:10 am

Title: Linking Problem with SFML/Visual Studio
Post by: jerryd 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


Title: Re: Linking Problem with SFML/Visual Studio
Post by: eXpl0it3r on May 24, 2017, 04:50:59 pm
Since you set SFML_STATIC, are you also linking SFML statically? And SFML's dependencies?