I'm testing the curlPP library and wrote the following program:
#include <iostream>
#include <curlpp/cURLpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>
#include <sstream>
using namespace std;
using namespace curlpp::options;
int main(int argc, char** argv)
{
curlpp::Cleanup myCleanup;
std::cout << curlpp::options::Url("http://wikipedia.org");
std::ostringstream os;
os << curlpp::options::Url("http://wikipedia.org");
return 0;
}
And compiling with the following command:
g++ -o http_get httpreq.cpp -lcurlpp
However, I get:
/usr/bin/ld: /tmp/ccSQpqLj.o: undefined reference to symbol 'curl_easy_setopt@@CURL_GNUTLS_3'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Any ideas how to solve the problem?