title: Curl - undefined references - using RestClientCpp
body: <p>I'm making an application that uses RestClient-Cpp on Windows, using MingW.
  I built OpenSSL, and after that I tried to build Curl dynamically, but that failed, so I now have it built statically.
  After that, I tried to build RestClient and that didn't give me any warnings.
  Now in CLion, I'm using this CMake file;</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.2)
  project(project)
  
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  set(SOURCE_FILES main.cpp)
  # add_definitions(-DCURL_STATICLIB)
  # find_library(curl NAMES curl libcurl)
  # find_package(curl)
  # add_definitions(-lcurl)
  # find_library(restclient-cpp NAMES restclient restclient-cpp)
  # add_library(curl STATIC IMPORTED)
  # set_property(TARGET curl PROPERTY IMPORTED_LOCATION C:/MinGW/lib/libcurl.a)
  add_executable(project ${SOURCE_FILES})
  target_link_libraries(project restclient-cpp)
  </code></pre>
  
  <p>The commented lines are some of the stuff that I tried to get it to work, but up until now, no luck...
  I always get this error;</p>
  
  <pre><code>c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../librestclient-cpp.a(librestclient_cpp_la-restclient.o): In function `ZN10RestClient3getERKSs':
  c:\MinGW\stuff\restclient/source/restclient.cpp:45: undefined reference to `_imp__curl_easy_init'
  c:\MinGW\stuff\restclient/source/restclient.cpp:49: undefined reference to `_imp__curl_easy_setopt'
  c:\MinGW\stuff\restclient/source/restclient.cpp:66: undefined reference to `_imp__curl_easy_perform'
  c:\MinGW\stuff\restclient/source/restclient.cpp:74: undefined reference to `_imp__curl_easy_getinfo'
  c:\MinGW\stuff\restclient/source/restclient.cpp:77: undefined reference to `_imp__curl_easy_cleanup'
  c:\MinGW\stuff\restclient/source/restclient.cpp:78: undefined reference to `_imp__curl_global_cleanup'
  c:\MinGW\stuff\restclient/source/restclient.cpp:50: undefined reference to `_imp__curl_easy_setopt'
  </code></pre>
  
  <p>when I'm linking... Any and all ideas are welcome...</p>