cURL / Mailing Lists / curl-library / Single Mail



From: Andrés García <>
Date: Thu, 18 Dec 2003 18:03:04 +0100


I am trying out the CURLOPT_IPRESOLVE problem, but
I can't get it right, even something a simple as:

int main(void)
  CURL *curl;
  CURLcode res;

  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_URL, "");
    res = curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
    if(res) {
        printf("Error: %d\n",res);
    res = curl_easy_perform(curl);
  return 0;

returns error 2 in curl_easy_setopt whenever I try to set the option.

Anything I am doing wrong?


This email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now!
Received on 2003-12-18