Re: Attach library (.a) in Xcode
Re: Attach library (.a) in Xcode
- Subject: Re: Attach library (.a) in Xcode
- From: "Sherm Pendley" <email@hidden>
- Date: Wed, 25 Jun 2008 18:37:25 -0400
On Wed, Jun 25, 2008 at 6:25 PM, Jens Alfke <email@hidden> wrote:
>
> Basically you need to add a new Copy Files build phase that copies the .a
> file into your app bundle (usually into the Framworks directory.)
You're thinking of a dylib, i.e. a dynamic library. An .a file is
statically linked - its contents are copied into the binary at
link-time.
> But the tricky part is that you need to get the linker to change where it
> will look for the library, from /usr/local/bin to inside the bundle. There
> is some command to postprocess the built code to do that, but I don't
> remember how it works...
For a *dynamic* library, one can either set the install path in Xcode,
or if it's not built with Xcode or you don't have the source, you
could use install_name_tool. But there's no need to do that for a
static library; its contents are included in the
Contents/MacOS/WhateverApp already, so there's no external library
file to look for.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden