cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: libcurl as static library

From: Cristina Gil <cristina.gil_at_sumenor.com>
Date: Fri, 17 Sep 2010 08:21:39 +0200

Hello,

I wanna compile my program in static mode (it works fine in dynamic), I
re-compiled libcurl with (To force a static library compile, disable the
shared library creation by running configure like:
      ./configure --disable-shared)

Then set: curl-config --static-libs
Compile mi program: g++ -static *.cpp -o scs_H264 -pthread -lcurl

/usr/local/lib/libcurl.a(netrc.o): In function `Curl_parsenetrc':
netrc.c:(.text+0x361): warning: Using 'getpwuid' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking
/usr/local/lib/libcurl.a(curl_addrinfo.o): In function
`Curl_getaddrinfo_ex':
curl_addrinfo.c:(.text+0x8e): warning: Using 'getaddrinfo' in statically
linked applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/local/lib/libcurl.a(strerror.o): In function `Curl_idn_strerror':
strerror.c:(.text+0x14e): undefined reference to `idna_strerror'
/usr/local/lib/libcurl.a(timeval.o): In function `curlx_tvnow':
timeval.c:(.text+0x19): undefined reference to `clock_gettime'
/usr/local/lib/libcurl.a(url.o): In function `fix_hostname':
url.c:(.text+0x35e): undefined reference to `stringprep_check_version'
url.c:(.text+0x383): undefined reference to `idna_to_ascii_lz'
url.c:(.text+0x38b): undefined reference to `stringprep_locale_charset'
url.c:(.text+0x3c7): undefined reference to `idna_to_unicode_lzlz'
url.c:(.text+0x425): undefined reference to `tld_check_lz'
[...]

collect2: ld returned 1 exit status

What im doing wrong??

Thanks for your help, best regards.

-----Mensaje original-----
De: curl-users-bounces_at_cool.haxx.se [mailto:curl-users-bounces_at_cool.haxx.se]
En nombre de Dan Fandrich
Enviado el: lunes, 13 de septiembre de 2010 20:32
Para: curl-users_at_cool.haxx.se
Asunto: Re: libcurl as static library

On Mon, Sep 13, 2010 at 09:49:59AM +0200, Cristina Gil wrote:
> Which commands do I need to compile/link statically libcurl to my program?

`curl-config --static-libs`

>>> Dan
-------------------------------------------------------------------
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

AVISO LEGAL
La Informacion incluida en el presente correo electronico es SECRETO PROFESIONAL Y CONFIDENCIAL, siendo para el uso exclusivo del destinatario arriba mencionado. Si usted lee este mensaje y no es el destinatario seƱalado, el empleado o el agente responsable de entregar el mensaje al destinatario, o ha recibido esta comunicacion por error, le informamos que esta totalmente prohibida cualquier divulgacion, distribucion o reproduccion de esta comunicacion, y le rogamos que nos lo notifique inmediatamente y nos devuelva el mensaje original a la direccion arriba mencionada. Gracias.

-------------------------------------------------------------------
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 2010-09-17