cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: problems with static lib

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 5 Jun 2002 16:53:36 +0200 (MET DST)

On Mon, 3 Jun 2002, John Proctor wrote:

> I am having problems linking the static version of libcurl under linux.

> I downloaded ftpget.c from the website example and tried to compile via
>
> gcc -static `curl-config --cflags` `curl-config --libs` -o ftpget ftpget.c
>
> which results in
>
> /tmp/ccGDzJJ9.o: In function `main':
> /tmp/ccGDzJJ9.o(.text+0x92): undefined reference to `curl_global_init'

[snip]

> If I do not use the -static switch it compiles fine and ftpget works.

> Any ideas?

I usually make only the static version in case I want a static binary and
then I don't get this problem... :-O

This seems like a pretty basic gcc use case, but I don't know the answer!

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
Received on 2002-06-05