Re: [Errors undefined reference]
Date: Sun, 01 May 2005 23:20:13 +0200
Daniel Stenberg wrote:
> 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.
> or possibly
> -L/path/to/dir/with/libcurl -lcurl
> ... is probably what you need to add.
Thanks a lot!! It works very fine with :
gcc my_file.c -o my_file.o -lcurl
Received on 2005-05-01