SFML community forums
Help => General => Topic started by: NameUser on September 10, 2012, 12:33:16 am
-
Heyo.
When I moved computers, SFML started doing something odd. While before that it had started it's file path when loading images or files at the project, meaning I could easily include images or needed files within the project's folder, it now starts at the base. Because of this, I've had to keep my files in my C: directory and link to them there. It was a nuisance, but I just dealt with it. Now that I'm nearing giving out a very early alpha of my game to a few people, that's no longer an option.
Is there any reason SFML might no longer be starting the file path at the proper directory? If not, how can I go about manually setting to the file path to start at the project when the path to the project from the base might vary?
-
A C++ application will start search for resources given through a relative path, relativly to the working directory. Why your applications switch automatically the working directory to C:\ I don't know. Do you call your application with a symbolic link, that might use a diffrent working directory?
How do you run your application?
-
VC++
Debug -> Start Debugging
That usually. Though just running the exe directly yields the same results.
-
Well from VS and the default path you'll have to put the files next to the project file, otherwise you can change the working directory in Project->Preferences->C/C++->Debugging->Working Directory
And if you run the EXE from the explorer then the resources need to be directly next to the EXE.