cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: static link

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 14 Sep 2006 12:23:52 -0700

On Thu, Sep 14, 2006 at 02:05:52PM -0500, Richard Pickett wrote:
> That gets me further down the road. But what a ball of ear wax it turns
> into. I link, it spits out errors about some lib missing a function, I have
> to figure out which lib.a has that function in it, add that to the end of
> the link command, re-run the link. Next missing function... I've added 7
> more libraries doing this and it seems like there's no end in site. Is there
> an easy way to tell gcc "pick all appropriate libraries looking in
> /usr/lib"?

I really doubt there's such a function. If all the dependent libraries
were compiled with libtool as well as your app, you can simply pass in
/usr/lib/libcurl.la to the libtoolified link command instead of
/usr/lib/libcurl.a and libtool will take care of all the dependencies
for you. Alternatively, you can manually run ldd on the dynamic versions
of the libraries to see what each depends on and add the static versions
to your link command. Or, for each dependent library, you could use
the pkg-config --libs-only-l option or equivalent PKGNAME-config option
(e.g. curl-config --libs) to do the same, assuming that each dependent
library supports one of those methods.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2006-09-14