cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [Errors undefined reference]

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sat, 30 Apr 2005 18:19:52 +0200 (CEST)

On Sat, 30 Apr 2005, Frederic Weisbecker wrote:

> My problem occures during the compilation. I have this message from gcc:
>
> /tmp/ccajJGAq.o(.text+0x18): In function `main':
> : undefined reference to `curl_global_init'
> /tmp/ccajJGAq.o(.text+0x1d): In function `main':
> : undefined reference to `curl_easy_init'

This is a link error, and happens because you haven't told the linker to link
with libcurl, or you didn't point out the proper dir for it to find it.

  -lcurl

or possibly

  -L/path/to/dir/with/libcurl -lcurl

... is probably what you need to add.

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