SFML community forums

Help => General => Topic started by: OhGodWhy on May 28, 2017, 01:54:46 am

Title: Multiple linker errors after upgrading Visual Studio
Post by: OhGodWhy 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 :(
Title: Re: Multiple linker errors after upgrading Visual Studio
Post by: eXpl0it3r 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.