cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Building libcurl as static archive with a static openssl and zlib

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 10 Mar 2005 11:38:22 -0800

On Thu, Mar 10, 2005 at 11:36:19AM -0700, Darryl Bleau wrote:
> So, I'm not sure how to archive libcurl as a .a to be linked in while
> maintaining the openssl.a and zlib.a (so that libcurl can use those,
> without having to be built with static openssl and zlib in itself. I
> hope that makes sense).
>
> If someone can show me the way, I'd much appreciate it.

By default, the curl build system will build both static and shared libraries
(if possible). When you link your application, you can simply include
libcurl.a as one of the objects to link, instead of using -lcurl. Or, you
could give the --disable-shared configure option when building curl to stop
it from creating a shared library to begin with. Then just make sure there
aren't any shared libraries around that could accidentally be used and
link your app normally.

>>> Dan

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