title: c++ curl undefined reference to _imp__curl_easy_init Codeblocks
body: <p>downloaded precompiled libcurl from github, linked library to project and included header file and i'm trying to run simple code</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;curl/curl.h&gt;
  
  
  static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
  {
      ((std::string*)userp)-&gt;append((char*)contents, size * nmemb);
      return size * nmemb;
  }
  
  int main(void)
  {
    CURL *curl;
    CURLcode res;
    std::string readBuffer;
  
    curl = curl_easy_init();
    if(curl) {
      curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com");
      curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
      curl_easy_setopt(curl, CURLOPT_WRITEDATA, &amp;readBuffer);
      res = curl_easy_perform(curl);
      curl_easy_cleanup(curl);
  
      std::cout &lt;&lt; readBuffer &lt;&lt; std::endl;
    }
    return 0;
  }
  </code></pre>
  
  <p>but i'm receiving errors</p>
  
  <p>undefined reference to _imp__curl_easy_init
  undefined reference to _imp__curl_easy_setopt
  undefined reference to _imp__curl_easy_perform
  undefined reference to _imp__curl_easy_cleanup</p>
  
  <p>can anyone help me? i'm on windows 10 and using codeblocks 17 </p>