Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install cURLpp in Windows?

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?

like image 708
Pebsie Avatar asked Apr 26 '11 21:04

Pebsie


People also ask

What is cURLpp?

cURLpp is a C++ wrapper for libcURL. libcURL is described as: a free and easy-to-use client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP.


1 Answers

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 [email protected]: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.

like image 53
rnicolas Avatar answered Sep 20 '22 18:09

rnicolas