Re: embedding libraries
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.