• 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: How to build a static lib with another static lib?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How to build a static lib with another static lib? (From: Quinn Dunki <email@hidden>)

  • Prev by Date: Re: Xcode 1.5 + svn = slow
  • Next by Date: Static library using a class
  • Previous by thread: How to build a static lib with another static lib?
  • Next by thread: Re: How to build a static lib with another static lib?
  • Index(es):
    • Date
    • Thread