• Advertisement
Sign in to follow this  

Physfs help

This topic is 3619 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm attempting to get Physfs working in my project, and though I couldn't find any set up instructions at all on the website I have managed to get a it building in VS. The problem I'm having is that when I attempted to open .zip archive file Physfs said "Archive type unsupported" and so I checked using PHYSFS_supportedArchiveTypes() which is supposed to list the supported archive types and it says there aren't any supported archive types... I'm guessing I might have built the program incorrectly but can't see any obvious solution.. does anyone know how to get PhysFS working with archive types?

Share this post


Link to post
Share on other sites
Advertisement
When you build PhysFS you need to set preprocessor definitions for which archivers it will use. For example, to enable zip support #define PHYSFS_SUPPORTS_ZIP. The definitions needed appear at the top of each of the .c files in the archivers directory.

Share this post


Link to post
Share on other sites
Thanks SiCrane, got it working now. It didn't work at first, but I added the #define to physfs.h also and now it does.

Share this post


Link to post
Share on other sites
Hi. I'm having a similar problem, and was hoping someone could offer some help.

I built PhysFS 1.1.1 in Visual Studio 2008 Express, after generating the project using the provided CMake files. I have been able to successfully read from ZIP files after adding them to the search path, but when I attempt to add the same file as the write directory, I get the same "Archive type unsupported" message. When I call PHYSFS_supportedArchiveTypes(), ZIP is included in the list along with a number of others, and when I check the properties of the PhysFS project which I used to build the library, PHYSFS_SUPPORTS_ZIP=1 is one of the entries in the preprocessor definitions section.

I thought perhaps that the ZIP file I was using had some kind of error in it, which would prevent PhysFS from properly recognizing it, so I recreated it and tried again, with the same result. Then, I downloaded a few other archive programs and tried creating the file with those, but still no luck.

So, would anyone happen to know what I'm doing wrong? Thanks a lot!

EDIT: I've tried version 1.0.1 as well, and got the same results.

[Edited by - Davian_ on March 28, 2008 4:53:54 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement