title: Undefined reference to curl_easy_init
body: <p>System Windows 7 64bit, Eclipse Mars + CDT, MinGW 64, curl source <a href="https://curl.haxx.se/download.html" rel="nofollow">https://curl.haxx.se/download.html</a> for Win64 - MinGW64 SSH SSL, have tried other versions with very same linker errors
  Code:</p>
  
  <pre><code>#include &lt;curl/curl.h&gt;
  int main(void) {
      CURL * curl;
      curl = curl_easy_init();
      if (curl) {
          curl_easy_cleanup(curl);
      }
      return 0;
  }
  </code></pre>
  
  <p>The problem with linker errors:</p>
  
  <pre><code>Info: Internal Builder is used for build
  g++ -DCURL_STATICLIB "-IC:\\Source\\curl-7.40.0-devel-mingw64\\include" "-IC:\\Source\\curl-7.40.0-devel-mingw64\\include\\curl" -O0 -g3 -Wall -c -fmessage-length=0 -o main.o "..\\main.cpp" 
  g++ -static -Wl,-Map,output.map -o xmlServiceCall.exe main.o -lcurl "-LC:\\Source\\curl-7.40.0-devel-mingw64\\lib64" 
  main.o: In function `main':
  C:\workspace_mars_cpp\xmlServiceCall\Debug/../main.cpp:8: undefined reference to `curl_easy_init'
  C:\workspace_mars_cpp\xmlServiceCall\Debug/../main.cpp:25: undefined reference to `curl_easy_cleanup'
  collect2.exe: error: ld returned 1 exit status
  
  14:14:56 Build Finished (took 848ms)
  </code></pre>
  
  <p>Have read dozens of similar questions here, and also on other internets, but they all suggest change linking order or add paths which doesn't help. Where else could I dig to solve this problem?</p>