Page 1 of 1

Dynamic libraries Question...

PostPosted: Wed Sep 12, 2001 6:53 pm
by Obscure2a8
I'm trying to compile zlib and libpng. (I'm trying to set up enlightenment and it wants a newer version of libpng.dylib...) I can configure, make, and test both libraries, but the created files are .a libraries, and I'm needing the .dylib! Does anybody know if it's possible to generate a .dylib from the .a file? or do I need to change the makefile and add some sort of dynamic flag?

Re: Dynamic libraries Question...

PostPosted: Thu Sep 13, 2001 1:28 pm
by chrisp
You can find a lot of information about shared libraries on Darwin in the <A HREF="http://fink.sourceforge.net/doc/porting/" TARGET=_blank>Porting Tips</A> at the Fink website. In general it's not possible to create shared libs from a static archive, but on Darwin you can do that if you compiled the objects in the static archive with '-fno-common'.

In the case of zlib and libpng you'll have to patch the Makefiles. You can find patches for zlib 1.1.3 and libpng 1.0.12 in the Fink <A HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/fink/packages/dists/stable/main/finkinfo/" TARGET=_blank>CVS repository</A>. libpng 1.2.0 may already contain the necessary patches, I haven't checked yet.

-chrisp