SFML community forums

Help => General => Topic started by: steveRoll on October 08, 2019, 01:29:58 pm

Title: Problems with statically linking with Visual Studio 2017
Post by: steveRoll on October 08, 2019, 01:29:58 pm
I have followed the "SFML and Visual Studio" tutorial, and I put all the dependencies that the libraries I used needed (sfml-system, sfml-window and sfml-graphics). I am using the 32-bit libraries, and the project is also set to x86. When I try to compile the project, I get this linking error:
LNK2019 unresolved external symbol ___std_swap_ranges_trivially_swappable_noalias referenced in function "unsigned char * __cdecl std::_Swap_ranges_unchecked<unsigned char,0>(unsigned char * const,unsigned char * const,unsigned char * const)" (??$_Swap_ranges_unchecked@E$0A@@std@@YAPAEQAE00@Z)
And it says that this error comes from this file:
sfml-graphics-s-d.lib(Image.cpp.obj)
How can I fix this?
Title: Re: Problems with statically linking with Visual Studio 2017
Post by: eXpl0it3r on October 08, 2019, 01:35:43 pm
This error is usually solved by updating Visual Studio to a newer version or building SFML yourself from source. :)
Title: Re: Problems with statically linking with Visual Studio 2017
Post by: steveRoll on October 08, 2019, 02:17:52 pm
Yup, just updated Visual Studio and everything is working. Thanks!