curl-users
Re: curl_getinfo.c
From: Alex Bligh <alex_at_alex.org.uk>
Date: Thu, 17 Mar 2011 09:57:27 +0000
Date: Thu, 17 Mar 2011 09:57:27 +0000
--On 17 March 2011 14:56:49 +0530 Swapnil Ashtekar <swapashtekar_at_gmail.com>
wrote:
> $ gcc getinfo.c
> /tmp/ccxVEWth.o: In function `main':
> getinfo.c:(.text+0x82): undefined reference to `curl_easy_init'
> getinfo.c:(.text+0xb5): undefined reference to `curl_easy_setopt'
> getinfo.c:(.text+0xc1): undefined reference to `curl_easy_perform'
> getinfo.c:(.text+0xf0): undefined reference to `curl_easy_getinfo'
> getinfo.c:(.text+0x124): undefined reference to `curl_easy_cleanup'
> collect2: ld returned 1 exit status
You need to link to the curl library. Add "-lcurl" to the gcc line.
-- Alex Bligh ------------------------------------------------------------------- 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.htmlReceived on 2011-03-17