curl is a project containing a command line tool and a library that can be used to transfer data using a variety of protocols, including, of course, HTTP and HTTPS. The library API is written in C, but there are various C++ wrappers on top of it. One of those is curlcpp.

Here is an example, using curlcpp, of how to get weather data from

Here is how you get this working on Windows using Visual Studio 2017. The following instructions are for 32-bit version, but you can do the same for 64-bit.

For libcurl:

  • Download CURL from
  • Unzip and open the solution projects\Windows\VC15\curl-all.sln.
  • Build configurations LIB Release - DLL Windows SSPI and LIB Debug - DLL Windows SSPI for the target platform that you need (Win32 or x64)
  • Copy the output to build\lib\x86\ (or build\lib\x64\). To have both release and debug builds in the same folder name the debug one libcurld.lib.

For curlcpp:

  • Clone or download CURLCPP from
  • Create a subfolder called build in the project’s main folder.
  • Execute CMake from the build folder to create a Visual Studio solution. Here is an example that assums curl is in the same folder as curlcpp.
  • Open the generated project and build it.
  • Copy the output to lib\x86 (where lib is a subfolder in the curlcpp project main folder). To be able to have both Debug and Release builds in the same folder rename the Debug build to curlcppd.lib.

For your project using libcurl and curlcpp:

  • Add CURL_STATICLIB to the preprocessor definitions.
  • Add curl\include and curlcpp\include to the list of Additional Include Directories. (Make sure you include the correct relative paths.)
  • Add curl and curlcpp output folders, curl\build\lib\x86 and curlcpp\lib\x86\, to the Additional Library Directories.
  • Add the following static libraries to the list of Additional dependencies: libcurld.lib;curlcppd.lib;Crypt32.lib;ws2_32.lib;winmm.lib;wldap32.lib;

Attached is a demo project with libcurl and curlcpp builds for both 32 and 64-bit platforms.


  • zip curldemo
    File size: 6 MB Downloads: 10
, , , , , , Hits for this post: 582 .

no comment untill now

Add your comment now