Re: Link to zlib
Re: Link to zlib
- Subject: Re: Link to zlib
- From: Jens Alfke <email@hidden>
- Date: Wed, 11 Jun 2008 07:48:12 -0700
On 11 Jun '08, at 6:20 AM, email@hidden wrote:
For such 'standard' libraries, the usual recommendation is to not
add them to the project at all, but to add them to the 'Other Linker
flags' in the target. For libzlib, you would use -lz
Really? I've never heard that. I find it more convenient to use the GUI.
I think the reason for this is to avoid hard-coded dependancies on a
particular version of the library.
You can avoid that by adding the library file that doesn't have a
version number in it, i.e. "libz.dylib" not "libz.1.2.3.dylib". This
is a symlink that always points to the current version, and it's the
same file the linker would use if you added "-lz".
(Xcode used to have a bug where if you did this it would "helpfully"
resolve the symlink and actually add the specific version file; but
that's been fixed for years.)
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden