I define paths to images and sound in my code with a string like this:
“Graphics\ \player.png”
I also load images through xml files and then the path looks like this:
< Graphics\tile1.png >
The graphics folder is in the project root and it works perfectly on the computer I use for developing.
If I build a release build and run it from my main computer it works properly if the Graphics folder is in the same folder as the .exe.
However, if I run the exact same thing from another computer it doesn’t find any images or sound.
The dlls are probably correct, the game runs properly.
I ahve tested this on multiple computers with different specs and drivers but none work.
If I move the uncompiled source code to another computer and compile it there it works properly.
So my question is, am I missing something when I run compiled code on another computer?
You’re using relative paths. Do you do a chdir() somewhere to the root directory from where these paths reference?
That said, you shouldn’t use relative paths anywhere. Make them absolute on startup so that you never have this problem, and no (e.g.) third-party dll that calls chdir() can throw off your resource loading.