Re: How to build a static lib with another static lib?
Re: How to build a static lib with another static lib?
- Subject: Re: How to build a static lib with another static lib?
- From: Andrew White <email@hidden>
- Date: Wed, 06 Oct 2004 12:41:10 +1000
Quinn Dunki wrote:
I'm new to serious Unix development, and I'm troubled by something. I'm
building a static library for public use that relies on another static
library.
I can only get it to work by doing this:
ld endUsersProduct.o -lmyStaticLib -lotherLib
I don't want the user to have to know to link with both libs, or even
know about -lotherLib. I'm new to libtool, but it doesn't seem to have
an equivalent of -l in ld. Dynamic Libs have the option to pass flags
down to ld, but static libs don't. I wouldn't mind having to include
both libs in the distribution, if there's some way to automate the
linking of both together.
The ideal solution is to link them together ahead of time into one
static lib. This was a no brainer on PC, so I'm sure I'm missing
something obvious here.
Not really Xcode, but have you tried using 'libtool' or 'ar' to dump the
contents of 'otherLib' into 'myStaticLib'? Libtool explicitly notes that
it can take archives as inputs.
--
Andrew White
_______________________________________________
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