cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: statically linking libcurl

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 26 Apr 2005 15:58:33 +0200 (CEST)

On Sun, 24 Apr 2005, Chris Neale wrote:

> I have judged whether or not a statically linked executable has been
> produced based only on file size since, without another computer, I do not
> know how to actually test for static linking in an otherwise functional
> executable.

In Linux/Unix you can 'ldd curl' to see what dynamic libs it needs (or not).

> Adding #define CURL_STATICLIB to my c source code appears to be identical to
> adding -DCURL_STATICLIB to my CFLAGS in the makefile.

On Linux, neither has any particular impact.

> I have read some previous posts that suggest to compile curl using
> --disable-shared

configure --disable-shared will have you build a static libcurl only.

> but also I have seen it mentioned that both the static and dynamically
> linked libraries are produced with the regular compilation.

That is correct.

> I have compiled curl simply by downloading it and typing make.

If you do that on a linux/unix it runs a default configure and it thus will
build both a static and a shared libcurl.

You then decide which one to use when you link your application.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-04-26

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET