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

Author Topic: Multiple linker errors after upgrading Visual Studio  (Read 1236 times)

0 Members and 1 Guest are viewing this topic.

OhGodWhy

  • Newbie
  • *
  • Posts: 1
    • View Profile
Multiple linker errors after upgrading Visual Studio
« on: May 28, 2017, 01:54:46 am »
I've recently upgraded Visual Studio from the 2015 version to 2017. My project which previously compiled fine in the debug configuration under the previous version now throws these linker errors: https://pastebin.com/ajrGwKy2
All LNK2019 and LNK2001 errors, listing sfml-window-s-d.lib as the offending file.

I thought maybe I'd have to recompile SFML with Visual Studio 2017 to get it to work. Done that, still getting the same errors. Googling for a bit and reading other peoples problems was no help, I've checked all the usual causes for linker errors:
- Linker library directory is set correctly
- All SFML .lib files and their dependencies are included
- SFML_STATIC flag is set and the -s versions of the libraries are included
- Debug configuration includes -d libraries, release does not
- SFML as well as my project are built with /MDd and /MD

As I've mentioned the project compiled fine with the 2015 version of VS. Additionally it's only the debug configuration that does not work, release compiles fine. I've checked to see if there are any differences in the project settings between the two configurations, but aside from the use of the -d versions of the libraries they are identical. I am at a complete loss :(

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Multiple linker errors after upgrading Visual Studio
« Reply #1 on: May 28, 2017, 10:15:29 pm »
Looks like you removed the inherited libraries from the additional libraries. The first error occurs because you're not linking user32.lib and I assume there are some more missing.

Unresolved errors can often be easily resolved by googling the readable function name and looking up to which library the function belongs to.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/