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

Author Topic: "___std_swap_ranges_trivially_swappable_noalias" still not solved for me  (Read 2814 times)

0 Members and 1 Guest are viewing this topic.

Bernd-R

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
After a few years of successfully using SFML for designing flight simulator instruments I changed my computer and updated all software to the latest version. Trying to continue with SFML gave me a lot of linker errors. To find out what the cause of the errors is I then tried the example from the beginner’s tutorial (source code exactly copied) which should result in showing a green circle. I got the following two error messages:

LNK2019 unresolved external symbol "___std_swap_ranges_trivially_swappable_noalias"
LNK1120 1 unresolved external 

Some data of my system: Windows 10 with Visual Studio 2017 (including all updates) with platform toolset v140 (the one from VS 2015), SFML 2.5.0 for VS 2015

I found a few threats on the forum describing a similar problem:
https://en.sfml-dev.org/forums/index.php?topic=24076.0

However, I must admit I do not understand the proposed solution because of my limited programming experience. What should I change in my green-circle-test-project to make it run?

Thanks for helping.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Why do you use VS 2015 binaries when there are VS 2017 binaries?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Bernd-R

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: "___std_swap_ranges_trivially_swappable_noalias" still not solved for me
« Reply #2 on: October 15, 2018, 08:49:22 am »
For my flight simulator instruments I also have to add simconnect.lib from Lockheed Martin (p3d). For that library in the newest version only VS2015 binaries are available.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: "___std_swap_ranges_trivially_swappable_noalias" still not solved for me
« Reply #3 on: October 15, 2018, 10:48:49 am »
Whenever you have an odd toolchain setup/configuration it's best to just rebuild SFML (or any other library) with your setup, instead of hoping that other binaries will just work with your setup. ;)

You may also want to check that simconnect.lib on its own works with VS2017 with the other toolchain.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Bernd-R

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: "___std_swap_ranges_trivially_swappable_noalias" still not solved for me
« Reply #4 on: October 15, 2018, 11:51:29 am »
The publisher of simconnect.lib says that the platform toolset has to be v140:
http://www.prepar3d.com/SDKv4/LearningCenter.php

There are also some discussions on various forums where people tried to use the "wrong" platform toolset. I have not found solutions other than "Use the correct platform toolset".

When I am back home today I will try the green circle example with the VS2017 binaries of SFML to see if I may have included other errors. Do you think it makes sense to work with VS2015 directly instead of VS2017 with a platform toolset for VS2015?   

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: "___std_swap_ranges_trivially_swappable_noalias" still not solved for me
« Reply #5 on: October 15, 2018, 12:24:50 pm »
I'd probably stick with VS 2017 and just use the v140 toolchain. That way you get the latest IDE updates, while being compatible with simconnect.lib

I suggest to generate a SFML VS 2017 solution file with CMake, open that up in VS and changing the toolchain for all the projects to v140 and then build SFML with VS 2017 for v140 toolchain. That way you should get fully compatible libraries.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/