0

I have been attempting to install either curlpp or curlcpp to write a program in c++ capable of making simple http requests. I first downloaded curlcpp from github (https://github.com/JosephP91/curlcpp) and followed its instructions for installation, but when I tried to compile the sample program in its readme file with:

  c++ -std=c++11 -I /file/path/curlcpp-master/include curl.cpp -L /file/path/curlcpp-master/build/src -lcurlcpp -o curl

my compiler gives me what appears to be a linking error:

   Undefined symbols for architecture x86_64:
 "_curl_easy_cleanup", referenced from:
  curl::curl_easy::operator=(curl::curl_easy const&) in libcurlcpp.a(curl_easy.cpp.o)
  curl::curl_easy::~curl_easy() in libcurlcpp.a(curl_easy.cpp.o)

etc.

I then tried curlpp, which I downloaded from here: https://github.com/jpbarrette/curlpp

But what I downloaded had no configure file. If anyone is able to help me successfully install either of these programs I would be enormously grateful.

Jonathan Basile
  • 649
  • 1
  • 10
  • 20
  • 2
    `"my compiler found 200+ errors in the included files."` ...probably due to missing header files (that you need to install), but you didn't include any of the compiler output, so helping you will be next to impossible. – Jonathon Reinhart May 05 '15 at 18:06
  • 1
    to generate curlpp's (the second one) configure script use `autogen.sh` (it's a common convention not to keep under version control generated files[*](http://stackoverflow.com/questions/8865093/should-a-configure-script-be-distributed-if-configure-ac-is-available)) – Diego May 05 '15 at 18:13
  • hey @JonathonReinhart - I realized that the errors were caused by my failing to compile as c++11, so I changed the bash line above and included the beginning of the error message Im getting now. Let me know if you would like to see the rest of that message (I only truncated it because its quite long) – Jonathan Basile May 05 '15 at 18:16
  • 2
    Did you [link against `libcurl` itself?](http://stackoverflow.com/questions/3840957)? – Jonathon Reinhart May 05 '15 at 18:18
  • 2
    You need to pass `-lcurl` to the compiler. – nrussell May 05 '15 at 18:20
  • thank you! that worked beautifully. @Diego - I tried to run autogen.sh with `/bin/sh ./autogen.sh` but i got the message: `buildconf: autoconf not found. You need autoconf version 2.57 or newer installed.` - is that accurate? do I need to install GNU autoconf for this? – Jonathan Basile May 05 '15 at 18:23
  • 1
    yes, you need the set of autotools to generate configure. (that's why release tar balls should include configure; although in ths case curlcpp doesn't) – Diego May 05 '15 at 18:32

0 Answers0