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

Author Topic: Problems with statically linking with Visual Studio 2017  (Read 966 times)

0 Members and 1 Guest are viewing this topic.

steveRoll

  • Newbie
  • *
  • Posts: 5
    • View Profile
Problems with statically linking with Visual Studio 2017
« 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
Re: Problems with statically linking with Visual Studio 2017
« Reply #1 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. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

steveRoll

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Problems with statically linking with Visual Studio 2017
« Reply #2 on: October 08, 2019, 02:17:52 pm »
Yup, just updated Visual Studio and everything is working. Thanks!