cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Building a static version of the library

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 26 Aug 2008 10:27:41 -0700

On Tue, Aug 26, 2008 at 12:36:57PM -0400, Zachary Page wrote:
> I have just been grabbing the libcurl.a file after running 'make
> install'. I added
> that to my XCode project and use '-lcurl'. Like I said, everything
> built fine, it
> just still looks to the system for other .dylibs. What all do I need to
> add to my
> project in order to make everything static? I had assumed that the
> c-ares library
> got encapsulated in the libcurl.a, but I must be wrong.

All curl "officially" supports is statically linking with libcurl itself,
not its dependencies. You can use the output of `curl-config --static-libs'
to infer the kind dependent libraries you might need to also link statically,
but that won't quite be sufficient because they could each have dependencies
of their own (and so on (and so on (and so on))). Many libcurl dependencies
have *-config style programs of their own or use pkgconfig so the best way
forward is to use each of those in turn to generate a complete list of
dependent static libraries.

>>> Dan

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