SFML community forums
Help => General => Topic started by: adomas on January 22, 2016, 07:56:43 pm
-
Hello,
I have this strange issue. I use SFML 2.3.2 on Visual Studio Enterprise 2015. With Win32 (x86) configuration everything is OK, but when I try to compile on x64 I get errors. I use shared configurations and accordingly 32bit or 64bit SFML. On 64bit Release I get these Linker errors:
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B) GameTest103 D:\Workbench\Software\Dev\GameTest103\GameTest103\main.obj 1
Error LNK2001 unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B) GameTest103 D:\Workbench\Software\Dev\GameTest103\GameTest103\main.obj 1
How to I solve this? I use Console subsystem on both. x86 compiles fine with 32bit SFML and runs smoothly. But does not compile and link in x64 version and with 64bit SFML. What to do? Might be an error for SFML 2.3.2 VC++ 14 (2015) 64bit? BTW running Windows 10 Enterprise 64bit
-
You must have defined SFML_STATIC even though you use dynamic libs. ;)
-
I tried to define SFML_STATIC, but it did not help, I still get same error. I also tried using static libs, but I got even more linker errors. Any ideas?
-
I tried to define SFML_STATIC, but it did not help
You must have defined SFML_STATIC
This means that you did define it but you shouldn't (when linking dynamically).
-
Linker error does not change, with SFML_STATIC defined and not defined. It does not have impact on error :(
-
Post your full build command (http://www.sfml-dev.org/faq.php#tr-grl-verbose-ide) then.
-
Or just use -d.dll's
-
Or just use -d.dll's
-d indicates debug libs, not dynamic.
-
-s.dlls ofc, my mistake.
-
There are no -s.dll since -s indicate static, and it's only on the .lib. Please inform yourself before saying false stuff(twice).