Re: Linking cocoa to UNIX library
Re: Linking cocoa to UNIX library
- Subject: Re: Linking cocoa to UNIX library
- From: Sherm Pendley <email@hidden>
- Date: Mon, 21 Jul 2003 14:01:57 -0400
On Monday, July 21, 2003, at 01:38 PM, Erik Fears wrote:
Another possibility would
be to setup XCODE to build it as a static library and then link it
(I have no clue how to do this in XCODE).
I don't know if the approach I've taken is portable to XCode - it's
based on PB 2.x, and I haven't gotten my Panther CD yet. It should work,
though - I doubt that Apple has taken away the ability to add custom
shell scripts to the build process.
What I did was add a shell script build phase to my project. This shell
script looks for the library in a subdirectory of the project, and if
it's not present it builds it. It uses the '--prefix' option when
configuring the library, so that it gets installed in a subdirectory of
the project, and '--disable-shared' so that only a static library is
built. The only other thing I needed to do was to simply add the
necessary compiler (-Ifoo) and linker (-Lfoo -lfoo) flags.
The project I used this for (CamelBones) and the library I link into it
(LibFFI) are both open source, so if you'd like you can download the
whole thing at my site: <
http://www.dot-app.org>.
sherm--
If you listen to a UNIX shell, can you hear the C?
_______________________________________________
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.