OSDir fixing accessing important directories
When I’ve been building for different platforms in C++. I’ve experienced that there are no easy way to get the path to important directories.
Each platform has it’s own code to get it’s own specific paths, and they are also different on each platform. For instance the full path to where the executable is located. This path is important since you might load resources from the directory where the executable is located.
I spent some time coding a wrapper for all these platform dependent functions. So I don’t have to bother about what platform I am using when I am writing code for loading resources or saving game data. The wrapper supports Linux, Windows and Mac OSX.
Checkout the code on Bitbucket.