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

Author Topic: 2.5 linker error  (Read 3642 times)

0 Members and 1 Guest are viewing this topic.

NGM88

  • Full Member
  • ***
  • Posts: 162
    • View Profile
2.5 linker error
« 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.
« Last Edit: June 02, 2018, 02:24:52 pm by NGM88 »

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: 2.5 linker error
« Reply #1 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
« Last Edit: June 02, 2018, 02:33:09 pm by texus »
TGUI: C++ SFML GUI

 

anything