title: Adding static libcurl to Code::Blocks IDE
body: <p>I can't figure out how to properly add a static libcurl library to my Code::Blocks IDE. I want it static because then no .dll files, which are not included in Windows by default, are needed during runtime of my program. I am using this libcurl:
  <a href="http://curl.haxx.se/dlwiz/?type=lib&amp;os=Win32&amp;flav=-" rel="noreferrer">http://curl.haxx.se/dlwiz/?type=lib&amp;os=Win32&amp;flav=-</a> (minGW without OpenSSL)</p>
  <p>Here are my global compiler settings: <a href="http://img845.imageshack.us/img845/1381/halpr.jpg" rel="noreferrer">http://img845.imageshack.us/img845/1381/halpr.jpg</a></p>
  <p>I am getting the following error:</p>
  <blockquote>
  <p>ld.exe||cannot find -lCURL_STATICLIB| ||=== Build finished: 1 errors, 0 warnings ===|</p>
  </blockquote>
  <p>when compiling this code:</p>
  <pre><code>include &lt;stdio.h&gt;
  include &lt;curl/curl.h&gt;
  
  int main(void)
  {
  CURL *curl;
  CURLcode res;
  
  curl = curl_easy_init();
  if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, &quot;http://google.com&quot;);
  res = curl_easy_perform(curl);
  
  /* always cleanup */
  curl_easy_cleanup(curl);
  }
  return 0;
  }
  </code></pre>
  <p>Obviously it does not find CURL_STATICLIB, thu I got no idea why. I am not even sure if it was needed to add CURL_STATICLIB to my linker settings(I read it on other forums). I found some guys having same problem, but it isn't properly answered on any place:</p>
  <blockquote>
  <p>stackoverflow.com/questions/4176503/frustrated-with-libcurl</p>
  <p>forums.codeblocks.org/index.php?topic=11391.0</p>
  <p>old.nabble.com/gcc-working-with-libcurl-td20506927.html</p>
  <p>forums.devshed.com/c-programming-42/linker-error-using-libcurl-698071.html</p>
  </blockquote>
  <p>I am so tired of fighting with this, please help me.</p>
  <p>EDIT:</p>
  <p>Hello Victor, thank you for response!</p>
  <p>I will try to be as detailed as possible, so there are no missunderstandings.
  So, here is the image of the directory/folder tree for my C:\libs\ folder:</p>
  <p><a href="http://img199.imageshack.us/img199/6977/curl1.png" rel="noreferrer">http://img199.imageshack.us/img199/6977/curl1.png</a></p>
  <p>As you can see, it also includes build log, you will notice that the error this time is
  different than the one I posted previously. It's because I changed global compiler and build project settings.</p>
  <p>My new Build Project settings: <a href="http://img863.imageshack.us/img863/4404/buildoptions.png" rel="noreferrer">http://img863.imageshack.us/img863/4404/buildoptions.png</a>
  My new Global Compiler settings: <a href="http://img225.imageshack.us/img225/4926/curl2.png" rel="noreferrer">http://img225.imageshack.us/img225/4926/curl2.png</a></p>
  <p>I am sure I have configured these settings wrong and that's why I can not compile it.</p>