cURL / Mailing Lists / curl-library / Single Mail

curl-library

How include Curl Library on Eclipse Project

From: Demetrio Car <demetrio.pepi_at_gmail.com>
Date: Wed, 31 Aug 2011 16:57:39 -0300

I have curl installed in my linux Ubuntu. I tested it from terminal and it
is ok. Now I want to include in my Eclipse project. I just wrote
/usr/local/curl-7.21.7/lib in GCC C++ Linker under Library Search Path (-L).
What else should I do? I am getting the message "undefined reference to
`curl_easy_init'" to teste the below code.

#include
#include
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com");
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-31