I’m newbie to c++, and I’m using mingw compiler. the last line
#include <curlpp/cURLpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>
....
string url ("http://www.google.com");
curlpp::Cleanup myCleanup;
curlpp::options::Url myUrl(url);
throws the following long error while compilation
C:\Users\UserName\AppData\Local\Temp\ccpkmZ1C.o:test.cpp:(.text$_ZN6curlpp11Option
TraitISsL10CURLoption10002EED1Ev[curlpp::OptionTrait<std::basic_string<char, std
::char_traits<char>, std::allocator<char> >, (CURLoption)10002>::~OptionTrait()]
+0xb): undefined reference to `_imp___ZTVN6curlpp11OptionTraitISsL10CURLoption10
002EEE'
...
...
What’s wrong here? Do I need to do something more then copying include folders from curlpp and libcurl to use curlpp?
Thank you in advance!
This is a linker error.
You need to add the
libcurllibraries to the build command.Something like:
I am not sure of the exact name of the libcurl library.