Re: Link to zlib
Re: Link to zlib
- Subject: Re: Link to zlib
- From: "Sherm Pendley" <email@hidden>
- Date: Wed, 11 Jun 2008 11:49:32 -0400
On Wed, Jun 11, 2008 at 11:35 AM, Charles Srstka
<email@hidden> wrote:
> On Jun 11, 2008, at 9:48 AM, Jens Alfke wrote:
>
>> (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.)
>
> Has it?
Yes.
> I have a project that links against libcurl.dylib and libz.dylib,
> and if I otool -L the binary after building it, I still get:
>
> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
> /usr/lib/libcurl.3.dylib (compatibility version 4.0.0, current version
> 4.0.0)
Check the libraries with otool. Runtime dependencies come from the
install_name of the linked library, not from the filename that was
passed to the linker.
> when building against the 10.4u SDK (if I were building against the 10.5
> SDK, I'm sure it would link against libcurl.4.dylib and not work with Tiger
> anymore).
That's why (well - one reason why) you need to use the SDK that
corresponds to the oldest version of Mac OS X on which your app will
run. If you use a newer SDK, the symlink will resolve differently and
you'll end up linking to a library that isn't available on older OS
versions.
> To make my app launch on Panther, I've been using a custom SDK I made which
> is identical to the 10.4u SDK except with libcurl.2.dylib from Panther in it
> when compiling for PPC (compiling for Intel uses the regular 10.4u SDK, of
> course). Otherwise, it doesn't launch on Panther.
>
> It's pretty frustrating, so if there's a way to be able to use the GUI to
> add libraries without having to work around it in this way, I'd love to know
> how to do it.
>From Apple's "Cross-Development Programming Guide":
"To do so, add new entries for the SDKROOT_ppc and SDKROOT_i386 build
settings to the table in the Build pane of the target or project
inspector. Set SDKROOT_ppc to point to the Mac OS X 10.3.9 SDK and set
SDKROOT_i386 to point to the Mac OS X 10.4 Universal SDK. You can type
the full path to each SDK or simply drag the SDK folder from the
Finder to the Value column."
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development/UniversalBinaries/chapter_4_section_1.html>
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
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