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

Author Topic: Linking Issues  (Read 2119 times)

0 Members and 1 Guest are viewing this topic.

morning_brews

  • Newbie
  • *
  • Posts: 1
    • View Profile
Linking Issues
« on: May 23, 2018, 09:57:34 pm »
I know that there is already a high volume of linking issues, but after reading through as many as I could which are similar to my problem I decided to post myself.

So I'm trying to link to the SFML static libraries (graphics, window, system) on Visual Studio 2017. I've downloaded the "Visual C++ 15 (2017) - 32-bit" package. After reading through the tutorial multiple times I'm still left with 1 linking error (after a copy+paste of the tutorial code):
 
Severity        Code    Description     Project File    Line    Suppression State
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)  Project1        C:\Users\user\source\repos\Project1\Project1\sfml-graphics-s-d.lib(Image.cpp.obj)       1      
 

I've added "C:\SFML-2.5.0\include" to C++ -> General -> Additional Library Dependencies, as well as ""C:\SFML-2.5.0\lib" to Linker->General.

Also linked to the debug and static libraries in Linker->Input->Additional Dependencies.
Release:
sfml-graphics-s.lib;sfml-window-s.lib;sfml-system-s.lib;opengl32.lib;winmm.lib;gdi32.lib;freetype.lib;
Debug:
sfml-graphics-s-d.lib;sfml-window-s-d.lib;sfml-system-s-d.lib;opengl32.lib;winmm.lib;gdi32.lib;freetype.lib;

As well as adding SFML_STATIC; To C++->Preprocessor->Preprocessor Definitions for both Release and Debug.

Any help would be much appreciated. I have tried this on two separate machines and have only used SFML when I was running Linux. I know its a long post but after searching for a solution I've seen many posts often lack information so I decided to be as thorough as possible.

Thanks in advance!


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Linking Issues
« Reply #1 on: May 23, 2018, 10:31:35 pm »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/