I've tried to pack some assets into an archive with a custom extension, trying to follow a physfs tutorial (A very vague one) when I ran into a problem with initializing PHYSFS. It takes a paramater argv[0] however it's giving me an error that argv was not declared. I also tried passing argv as a paramater to the main function, but that doesn't seem to work either. Here's the small bit of code that's causing me trouble:
#include "physfs.h"
int FileManager()
{
PHYSFS_init(argv[0]) //error
...
}
From looking at this tutorial, it seems that the first and only parameter to PHYSFS_init
is supposed to be the path to the executing file. It also remarks that this is typically null, so you can pass null. I'd agree that the tutorial is lacking, in so far as I've read that paragraph, in that it doesn't actually explain what the parameter is used for. I assume it uses the parameter to calculate what the root directory to work from should be, based on the executable's path.