problem with cygcurl-2.dll

Discussion in 'C++' started by ftom2, Jul 16, 2007.

  1. ftom2

    ftom2 New Member

    Joined:
    Jul 16, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    i'm using cygwin and i've downloaded cygcurl-2.dll.
    but when i try to compile a simple example (taken from cURL site) i'm getting errors.

    this is my example:

    Code:
    #include <stdio.h>
    #include <curl/curl.h>
     
    int main(void)
    {
      CURL *curl;
      CURLcode res;
     
      curl = curl_easy_init();
      if(curl) {
        /* First set the URL that is about to receive our POST. This URL can
           just as well be a https:// URL if that is what should receive the
           data. */
        curl_easy_setopt(curl, CURLOPT_URL, "http://postit.example.com/moo.cgi");
        /* Now specify the POST data */
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl");
    
        /* Perform the request, res will get the return code */
        res = curl_easy_perform(curl);
    
        /* always cleanup */
        curl_easy_cleanup(curl);
      }
      return 0;
    }
    it recognizes the #include <curl/curl.h> line
    but i get "undefind reference" for all the other lines, such as : curl_easy_setopt(curl, CURLOPT_URL, "http://postit.example.com/moo.cgi");

    what am i doing wrong?
     
  2. ftom2

    ftom2 New Member

    Joined:
    Jul 16, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Problem solved.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice