cURL / Mailing Lists / curl-users / Single Mail

curl-users

AW: Building statically linked curl on Solaris

From: Christian Brinz <christian.brinz_at_genia-sec.de>
Date: Thu, 25 Jan 2007 18:04:54 +0100

Subject: Re: Building statically linked curl on Solaris

On Thu, Jan 25, 2007 at 08:46:30AM +0100, Christian Brinz wrote:
>> Since some days i?ve been desperately trying to build curl as statically
linked
>> binary (all in one, no dependencies on shared libs).
[...]
>> During all testing, I worked with this small configure script

>That's a lot of configure options, but you seem to be missing
--enable->static
>(and --disable-shared).
> Dan

As far as i know, these configure switches concern building of libcurl:
--enable-static und --disable-shared means to build the static libcurl libs,
but not the dynamic ones...

I try to achieve the static linking with CFLAGS="-static" and/or
LDFLAGS="..(-B)static.." but then, i get the known error
gethostbyname() not in libraries, because there is no libresolv.a on Solaris
(i think since Sol7).

So i think the CFLAGS="-static" is the right way, but how to avoid the
problem with gethostbyname()?

Christian
Received on 2007-01-25