cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Cannot Create Truly Static Program With cURL

From: <brandonshw_at_aol.com>
Date: Thu, 7 Jul 2011 10:53:54 -0400 (EDT)

I entered "curl-config --static-libs" at the Linux command line, but it says that it is not an available option.

-----Original Message-----
From: Dan Fandrich <dan_at_coneharvesters.com>
To: curl-users <curl-users_at_cool.haxx.se>
Sent: Thu, Jul 7, 2011 2:22 am
Subject: Re: Cannot Create Truly Static Program With cURL

On Wed, Jul 06, 2011 at 08:13:21PM -0400, brandonshw_at_aol.com wrote:
 I'm writing a program using curl to be run on Linux PCs which will be used by

 number of different users. I cannot have the users all install curl on their
 individual machines, so I have tried to link curl in statically, rather than
 using libcurl.so. I downloaded the source and created a libcurl.a static
 library. However, when I tried to link it in with my program, it showed a lot
 of disparate undefined references, in other words it had dependencies on other
 libraries. It would be hard to figure out all the things it's calling for and
 link in static versions of those libraries too.
"curl-config --static-libs" will tell you all the libraries you need to link
ith libcurl statically. It assumes, however, that the non-libcurl libraries
re either dynamic or have no further dependencies of their own.
> How do people use curl for
 programs that are to be distributed to several users, most of whom don't have
 curl libraries on their PCs? How can I use curl in my program completely
 statically.
Since libcurl used in this fashion will be used exclusively in one
pplication, you will know exactly which features you'll need. Then you
an build a custom libcurl yourself with only those features. That will
educe the number of extra libraries you'll need to link with your
pplication to satisfy libcurl, perhaps even reducing it to none.
>>> Dan
------------------------------------------------------------------
ist admin: http://cool.haxx.se/list/listinfo/curl-users
AQ: http://curl.haxx.se/docs/faq.html
tiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-07