Search code examples
visual-studio-2019sfml

What's different between -d.lib and just normal like SFML-system.lib?


I'm just starting to learn SFML with Visual Studio. I am faced with problems that my image doesn't loaded with texture.loadFromFile("path"). I found that someone solved this by changing every sfml-~~.lib in linker-input-additional dependency, to sfml-~~-d.lib. So I changed it and solved it! Now I'm wondering what makes the difference: What's "-d"?


Solution

  • -d is the debug library.

    As stated on their installation tutorial:

    It is important to link to the libraries that match the configuration: "sfml-xxx-d.lib" for Debug, and "sfml-xxx.lib" for Release. A bad mix may result in crashes.

    SFML and Visual Studio