Building cURLpp 0.7.2

I want to use cURLpp for a project I've been working on, but there's no package for Ubuntu.

I downloaded the tarball, but discovered that example 18 would not compile. It would fail with the following error:


example18.cpp: In function ‘int main(int, char**)’:
example18.cpp:85: error: ‘BoostWriteFunction’ is not a member of ‘cURLpp::Options’
example18.cpp:85: error: ‘test’ was not declared in this scope
example18.cpp:85: error: expected type-specifier
example18.cpp:85: error: expected `;'
make[1]: *** [example18.o] Error 1

I discovered that usage of the Boost libraries was an option, and wasn't being tested for in example 18. boost::bind is one of the tools I frequently use in C++, the Boost support seems less optional to me, so I cleaned and ran configure --with-boost. Still, I got the error.

It became clear that the configure-generated config.h was not being included. This patch fixed that, and fixed the compile:


--- ../../curlpp-0.7.2-orig/curlpp/global.h     2007-09-22 09:31:10.000000000 -0500
+++ global.h    2009-04-05 10:57:58.000000000 -0500
@@ -26,6 +26,8 @@
 
 #ifndef HAVE_CONFIG_H
 #include "config.win32.h"
+#else
+#include "config.h"
 #endif
 
 #endif

Sun, 05 Apr 2009 11:02

Comments: 2

Reader Comments

Sat Nov 28 13:38:00 2009, by Alex:

WOW, this is great. Thanks so much for your help, i could have never figured this out. Thanks a bunch.

Mon Nov 30 13:27:20 2009, by Michael:

Happy to help.

Add a Comment

  • Only the name field is mandatory. It's hard to keep track of a conversations where everyone is Anonymous.
  • If you choose to leave an email address, it will not be shown on the page.
  • A limited subset of HTML is allowed in your comment.

Name

Email

URL


Comment: (Limited HTML allowed.)