• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Attach library (.a) in Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Attach library (.a) in Xcode
      • From: Sebastian Nowicki <email@hidden>
References: 
 >Attach library (.a) in Xcode (From: "dexter morgan" <email@hidden>)
 >Re: Attach library (.a) in Xcode (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Attach library (.a) in Xcode
  • Next by Date: multiple definitions errors
  • Previous by thread: Re: Attach library (.a) in Xcode
  • Next by thread: Re: Attach library (.a) in Xcode
  • Index(es):
    • Date
    • Thread