SFML community forums
General => General discussions => Topic started by: mafiozy on January 14, 2023, 04:24:16 pm
-
hello everyone. I made my project, and trying to release it to send my friends. So program works when i load Debug folder with recourses and start exe from there, but doesnt work when i do the same but for Release folder. It says that it cannot load images and audios. What to do?
-
Depends on various variables. I'll assume you're using Windows to start with.
When you write sound.loadFromFile("resource/sound.wav"), then path the executable will try to load the files from, are relative to the working directory. When you double click the executable in explorer, the working directory is usually set to the same directory as the executable is in.
In short, you usually want the resources located relative to your executable.
Other than that, make sure to ship the necessary DLLs (don't forget OpenAL!) and if you're using Visual Studio, you may need to tell your friend to install the matching redistribution package to install the runtime libraries.