8

Complete newbie here, as you most probably guessed by my previous post. I can't seem to find anything on this, and I have never installed a library before. my previous question was answered with telling me to install and use libcurl, and that cURLpp is a wrapper for C++, so naturally I assumed that cURLpp was the way to go. So, how do I install it?

Pebsie
  • 95
  • 2
  • 9
  • possible duplicate of [How to use cURLpp/libcurl with Visual C++ 2008 Express](http://stackoverflow.com/questions/5356249/how-to-use-curlpp-libcurl-with-visual-c-2008-express) – Emile Cormier Apr 27 '11 at 02:24

1 Answers1

3

I know this question is quite old, but I will share what has worked in my experience.

OS: MS Windows 10 (64 bit)

I'm using MSYS2 MinGW GCC compiler and tools, so I assume mingw-gcc, mingw-cmake, mingw-make, and mingw-curl are already installed in the system and msys2/mingw64/bin is in your PATH.

In a terminal, follow these steps:

Step 1) git clone git@github.com:jpbarrette/curlpp.git

Step 2) cd curlpp

Step 3) mkdir build

Step 4) cd build

Step 5) cmake -G "MinGW Makefiles" .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF

Step 6) cmake --build .

After this, in your curlpp/build you will find the files libcurlpp.a, libcurlpp.dll.a, and libcurlpp.dll. Now you need to add libcurlpp.dll.a to your linker settings (remember to add libcurl.dll.a too, because it is a dependency of libcurlpp).

Finally, you can compile your program, and it should work. If you receive a message saying libcurlpp.dll is not found, copy the libcurlpp.dll next to your binary.

rnicolas
  • 85
  • 2
  • 8