How to link with zlib
How to link with zlib
- Subject: How to link with zlib
- From: Colin Klipsch <email@hidden>
- Date: Thu, 4 Jul 2002 10:50:56 -0400
Greetings.
My Cocoa application needs to avail itself of the 'zlib' compression
library. I assume this library is available on all OS X systems? It's
certainly sitting here on mine, but then again, that could be because I
have the Developer Tools installed. I didn't check that it's part of
the standard OS installation.
So I've tried three approaches:
(1) Add the Kernel framework to my project. I inferred that's the
right framework, since that's the one containing a 'zlib.h' file.
Result: at build time, a fatal 'can't locate framework for:
-framework Kernel' error.
(2) Compile in the zlib source code, available free for download.
Result: This works, though I get oodles of duplicate symbol
warnings, pretty much one for every zlib function. This suggests,
strangely enough, that the zlib functions are already 'there',
and that I don't need to add them. Or does it? Let's see...
(3) Build with neither the Kernel framework linked, nor with the
compiled zlib source.
Result: fatal error during build. Namely: 'illegal reference to
to symbol _adler32 defined in indirectly referenced dynamic
library /usr/lib/libz.1.1.3.dylib'
I'm afraid I'm stumped now. How do I avail myself of the zlib library?
-- Colin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.