Hello,
I am having a trouble when i try to save a simple configuration file using Allegro
5.0.9. When the program call the al_save_config_file() routine, the entire application crashes! (yes, i debugged it).
I wrote a very small program as a example and i putted it in attachment (ConfigFiles.cpp). I tested it and it still crashes when i run
I´m using MinGW 4.7.1 and the correct Allegro binaries for this version.
Someone could help me?
You need to initialize PhysFS using PHYSFS_init.
i'm initializing physfs using al_set_physfs_file_interface() and i could not find the PHYSFS_init() routine .
I tried to run the program without the PhysFS file interface and it worked fine!
How i could solve this problem with the PhysFS? (i will use .zip files in my project, so i will need it)
Thanks in advance
i'm initializing physfs using al_set_physfs_file_interface()
al_set_physfs_file_interface does not initialize PhysFS, I don't know why you would think that. It only sets up Allegro file functions to use PhysFS functions instead of the ones from C standard library
i could not find the PHYSFS_init() routine
Where did you look? It's a PhysFS function, not an Allegro function. You'll need to include the physfs.h header to get it to work. In general, look at ex_physfs.c example for an example of how to use it with Allegro.