SFML community forums

Help => General => Topic started by: NGM88 on June 02, 2018, 01:57:11 pm

Title: 2.5 linker error
Post by: NGM88 on June 02, 2018, 01:57:11 pm
error in debug:

1>sfml-graphics-s-d.lib(Image.cpp.obj) : 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)
1>C:\Development\TEMPLATES\SFML 2.5\Debug\SFML 2.5.exe : fatal error LNK1120: 1 unresolved externals

in release:

sfml-graphics-s.lib(Image.cpp.obj) : error LNK2001: unresolved external symbol ___std_swap_ranges_trivially_swappable_noalias

anyone know what this is about? I'm pretty sure I set everything up correctly. I use 2.4.2 all the time, I looked at the tutorial and the only difference was the absence of jpeg lib so I removed that. No idea what this error is all about though. Everything is linked according to the new tutorial.

copy paste from Linker -> Input -> Additional Dependencies (debug):

sfml-graphics-s-d.lib
sfml-window-s-d.lib
sfml-system-s-d.lib
opengl32.lib
freetype.lib
winmm.lib
gdi32.lib
sfml-audio-s-d.lib
openal32.lib
flac.lib
vorbisenc.lib
vorbisfile.lib
vorbis.lib
ogg.lib
sfml-network-s-d.lib
ws2_32.lib

same for Release except no -d s

headers and libraries are in the right place. I put the SFML_STATIC  macro for both debug and release. No idea what's wrong.
Title: Re: 2.5 linker error
Post by: texus on June 02, 2018, 02:31:13 pm
You need to update Visual Studio to use the libraries from the download page: https://en.sfml-dev.org/forums/index.php?topic=24044.msg163201#msg163201