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

Author Topic: Project runs perfect in Debug, Completly crashes in Release mode  (Read 879 times)

0 Members and 1 Guest are viewing this topic.

kyle_michiels

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Hey Guys,

I finally finished my project and it runs without error in Debug Mode,
However, when I switch to Release Mode it complains that it can't find my resources.
I included the assets folder with the EXE but it still can't find the files.

The error:


The file structure:



The structure is similar to the debug folder and just works fine in Debug mode.
I tried removing the "-d" from the lib files but this didn't make any difference.

I hope someone can help me out.

Greetings,

Kyle

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: Project runs perfect in Debug, Completly crashes in Release mode
« Reply #1 on: January 19, 2018, 09:39:55 pm »
Using the release libraries (no -d suffix) is non-optional.

The resources with relative paths are loaded relative to the working directory. Check your IDE's settings to see what it's set to.
Alternatively open the executable directly from explorer.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kyle_michiels

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Project runs perfect in Debug, Completly crashes in Release mode
« Reply #2 on: January 19, 2018, 10:01:28 pm »
Thanks for the quick reply!

I noticed there was an initialization error which fixed itself in debug mode but I had to initialize it for release mode.

And with the non "-d" files it works perfectly!

Many thanks!