Sign in to follow this  
_the_phantom_

How do you use PhysFS?

Recommended Posts

_the_phantom_    11250
So, as you may or may not know I'm developing a texture loading library and one of the key features I've got in is PhysFS support. However, I've hit apon a snag with my plan. Orignally I was compiling PhyFS into the library, however as some one pointed out doing this would restrict what others could do with it. So, instead I set it up so it compiles with PhysFS support but relies on the final app linking stage to pull the libs together to make it work. And this is where the problem comes in, you see, both PhyFS and my library both require zlib to work. Now, if I leave out zlib from the phyFS builds of my texture library I get unresolved externals on the final app build pointing to some functions that libpng uses but for some reason cant be found in the library. So, I'm trying to work out how to solve this problem, the current options I can think of are; - include the functions into my library and let the linker work the magic - give some cyptic instructions about using zlib as an external lib for both physFS and my library and letting the linker work the magic But, this kinda depends on how others use the library, as I'd like people to just be able to drop my library in and get going (which is while the first option appeals). Both libraries are using zlib123, which is why the unresolved external is confusing in the extream [oh]

Share this post


Link to post
Share on other sites
_the_phantom_    11250
With my library, neither.
It expects the final app to have the required functions in it or link to it (most of them resolve, its just 3 functions which dont).

PhysFS wise, the distro statically compiles the zlib code into the library.

The final test application is statically linking to both physFS and my library (well, my library doesnt come in a DLL form anyways).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this