Implementing libcurl

Windows

  1. Download the latest version of libcurl.
  2. Extract the \lib and \include folders to a convenient location.
  3. Open libcurl's VS project and change it to Release mode.
    Go to libcurl > Properties > C/C++ > Preprocessor > Definitions and add CURL_STATICLIB. Unless you really do want to use LDAP, add HTTP_ONLY too.
  4. Go to libcurl > Properties > C/C++ > Code Generation > Runtime Library and change it to read Multi-threaded (/MT).
    Build libcurl.
  5. Add libcurl.lib to your main project. The easiest way is to drag it onto the Solution Explorer.
  6. Go to Your Project > Properties > C/C++ > Preprocessor > Definitions and add CURL_STATICLIB, as you did to curl itself.
  7. Go to Your Project > Properties > C/C++ > General > Additional Include Directories and add the libcurl \include folder you extracted earlier.
  8. Go to Your Project > Linker > Input > Additional Dependencies and add ws2_32.lib. If you want to use LDAP, add wldap32.lib as well.
  9. #include "curl/curl.h" and start coding!

Remember that you will need to repeat steps 8-10 in both Release and Debug configurations.

Source: https://developer.valvesoftware.com/wiki/Implementing_libcurl