cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to build libcurl

From: Guenter <lists_at_gknw.net>
Date: Thu, 20 Aug 2009 14:50:59 +0200

Hi,
sumana ts schrieb:
> But it never worked for me.I have seen "-lcurl" linker option everywhere.
> Is this option mandatory to build any libcurl application?
yes.

> If i build post example as seperate standalone application and link
> without lcurl option.Its throwing undefined symbol references
> errors.
>
> How would i use libcurl.so/libcurl.sl <http://libcurl.sl> in my linux
> environment without -lcurl option?
you always need -lcurl to tell the linker where to find the otherwise
unresolved symbols - so at compile time its always mandatory.
However if you mean that you want to have an independent binary which
works without need to install libcurl then try this:
- configure / compile libcurl with --disable-shared
- compile your own app pointing to this libcurl
this should result in a statically linked app which has no dependency to
libcurl.so.

Günter.
Received on 2009-08-20