Hey,
I just installed Curlpp and the examples don't seem to work at all.
I had to change http://curlpp.org/index.php/examples/47-example-00
to
#include <curlpp/cURLpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>
using namespace cURLpp::Options;
int main(int, char **)
{
try {
// That's all that is needed to do cleanup of used resources
(RAII style).
cURLpp::Cleanup myCleanup;
// Our request to be sent.
cURLpp::Easy myRequest;
// Set the URL.
myRequest.setOpt(new cURLpp::Options::Url("http://
example.com"));
// Send request and get a result.
// By default the result goes to standard output.
myRequest.perform();
}
catch(cURLpp::RuntimeError & e) {
std::cout << e.what() << std::endl;
}
catch(cURLpp::LogicError & e) {
std::cout << e.what() << std::endl;
}
return 0;
}
Quite a lot of changes here is the diff
1c1
< #include <curlpp/cURLpp.hpp>
---
> #include <curlpp/curlpp.hpp>
5c5
< using namespace cURLpp::Options;
---
> using namespace curlpp::options;
11c11,12
< cURLpp::Cleanup myCleanup;
---
> curlpp::Cleanup myCleanup;
>
13c14,15
< cURLpp::Easy myRequest;
---
> curlpp::Easy myRequest;
>
15,16c17,18
< myRequest.
< setOpt(new cURLpp::Options::Url("http://example.com"));
---
> myRequest.setOpt < Url > ("http://example.com");
>
21c23,24
< catch(cURLpp::RuntimeError & e) {
---
>
> catch(curlpp::RuntimeError & e) {
24c27,28
< catch(cURLpp::LogicError & e) {
---
>
> catch(curlpp::LogicError & e) {
26a31
>
It seems all are like this. Did curlpp just change interfaces?
Thanks for the help though. The example still helped :-D
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"curlpp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/curlpp?hl=en
-~----------~----~----~----~------~----~------~--~---