• 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: embedding libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: embedding libraries


  • Subject: Re: embedding libraries
  • From: Aram Greenman <email@hidden>
  • Date: Sat, 15 Feb 2003 02:23:10 -0800

On Friday, February 14, 2003, at 11:11 PM, Edwin Zacharias wrote:

--- Nick Zitzmann <email@hidden> wrote:

On Friday, February 14, 2003, at 08:37 PM, Edwin
Zacharias wrote:

How do I embed a library (*.a file) into a Cocoa
app?

Just drag and drop the library into your project's
list of files, and
PB should do the rest for you.

This is not a standard Mac OS X library, so I would
like to include it within my application. For
Frameworks this is done by adding a Copy build phase
and doing some other things. I'm wondeing how to do
the same with libraries.

If only the static (.a) lib is in your library search path, then library becomes part of your app binary, no need to copy the lib into your app bundle.

However, if a shared (.dylib) lib of the same name also exists, then the linker will link to the shared lib even if you have added only the static lib to your project. (If there is a way to turn this off for a single library I'd like to know about it.)

In that case, you can either a) move the shared lib or change your library search path while building your project or b) build the shared lib with -install_name "@executable_path/../Frameworks/libfoo.dylib" and copy the shared lib into the Frameworks directory in your app bundle just like a framework.

Aram
_______________________________________________
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.

References: 
 >Re: embedding libraries (From: Edwin Zacharias <email@hidden>)

  • Prev by Date: Re: [SOLVED - But...] "Subclassing NSTableView while in a Java
  • Next by Date: Re: Protecting singleton objects from releasing
  • Previous by thread: Re: embedding libraries
  • Next by thread: how do I change the Kind of my document?
  • Index(es):
    • Date
    • Thread