Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 22
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11

    Hi, thanks for the tip. I tried that already ... as the new version came out the only need was to add include /usr/local/lib to /etc/ and run sudo /sbin/ldconfig and not the rest of it as I read there but it doesn't solve the problem, it has to be seomthing simple but it's driving me nuts

  2. #12
    Quote Originally Posted by SingleFemaleLawyer View Post
    Quote Originally Posted by JohnGraham
    what happens when you do run "updatedb ; locate curlpp.hpp"?
    I execute it and it takes some time processing but there is no outcome.
    That means there's no file called "curlpp.hpp" on your system.

    Quote Originally Posted by SingleFemaleLawyer View Post
    I don't understand why do I get an error when compiling
    PHP Code:
    #include <curlpp/curlpp.hpp> 
    but not with
    PHP Code:
    #include <curlpp/Easy.hpp>
    #include <curlpp/Options.hpp> 
    as they are all in the same library and it was correctly installed
    You get an error for the same reason as before - there is no "curlpp.hpp" available anywhere, let alone to the compiler. Most likely the example is just slightly old, and they haven't updated to the new name of the include file you need.

    Try the following:

    • Run "locate Easy.hpp". This should show you the directory where Easy.hpp and Options.hpp are. For the purpose of providing an example, let's say you find them in /usr/include/curlpp/.
    • Run the following two commands:
      ls /usr/local/curlpp/
      ls /usr/local/ | grep -i curlpp

    This should make it obvious if it is curlpp/Curlpp.hpp or curlpp.hpp (or whatever) that you actually need to include.

    If doing this doesn't solve your problem for you, post the output of the above two commands (the complete output, as well as the commands you typed, even if they're the same as above) so we can take a look.

  3. #13
    You were right, it looks like they didn't change the examples when updating the library. I found the hpp files ... the reason why the program nor I could find curlpp.hpp was because that file doesn't exist, it is named cURLpp.hpp with capital letters ... well, I found it and changed the include in the program. I compiled it, no errors.

    But then another problem, when I build it I get that "references to
    PHP Code:
    curlpp::Cleanup::Cleanup(), to curlpp::Easy::Easy() and to curlpp::Easy::perform() 
    are not defined" as well as some other errors which I think are caused by he first ones

  4. $spacer_open
  5. #14
    I'd guess you're not passing it an "-lcurlpp" option. Try adding that (or whatever -l option you need - it should be in the documentation) after the command you use to compile.

  6. #15
    I tried it (thoug I'm not sure what it is for and what it does) but the same happens, no outcome, though a .o file is created but i tried to run it and i got

    ./PrincipalCURL.o: error while loading shared libraries: cannot open shared object file: No such file or directory

    There seems to be a huge mess with all this because they changed a lot of names in the last version and a lots of things have to be corrected in the examples

    Here [ groups dot google dot com/group/curlpp/browse_thread/thread/395e203ba3e88714# ] it looks like in the new version the examples should work, but thats not true as we can see the first line is already wrong with that #include curlpp.hpp instead of cURLpp.hpp

    Maybe I shouldn't use curlpp and try to work with libcurl only

  7. #16
    Changed OS, installed everything again and now I keep getting these "undefined reference" errors when building ... no clue what's going on ?

  8. #17
    no clue what's going on
    No, and neither do I. The people on this board are not psychics - we're willing to help you, but you have to post specific error messages if we are to do that. Wild stabs in the dark are a waste of our and your time.

    If you're not sure which error message is the very first error message, just post the complete output of the command that fails (as well as the command that actually fails).

  9. #18
    I try to compile the following simple program

    PHP Code:
    #include <iostream>
    #include <curlpp/cURLpp.hpp>
    #include <curlpp/Easy.hpp>
    #include <curlpp/Options.hpp>

    using namespace std

    class trycurl{


    void Eko(){

    cout << "Working fine"; }


    int main(){

    // Very simple just to try if the library works
    curlpp::Easy eazy//This doesn't work

    trycurl t1;

    Then I compile it using g++

    g++ trycurl.cpp -o trycurl.o

    And I get this :

    PHP Code:
    /tmp/cc1ERUfc.oIn function `main':
    trycurl.cpp:(.text+0x13): undefined reference to 
    trycurl.cpp:(.text+0x30): undefined reference to `curlpp::Easy::~Easy()'
    trycurl.cpp:(.text+0x4b): undefined reference to `curlpp::Easy::~Easy()'
    collect2: ld returned 1 exit status 

  10. #19
    Quote Originally Posted by SingleFemaleLawyer View Post
    g++ trycurl.cpp -o trycurl.o
    You need to tell g++ where to find curlpp::Easy::Easy(), etc. I assume they're in a file called In that case, add "-lcurlpp" to the end of your g++ command-line.

  11. #20
    It is actually a folder named curlpp which contais the header and src folders, where Easy, cURLpp and Options are located.

    I tried to do what you posted and googled around it but still can't make it work.

    PHP Code:
    jess@linux:~> g++ trycurl.cpp -o trycurl.-lcurlpp
    then I run it and

    PHP Code:
    sh: /home/workspace/trycurl No such file or directory
    Process returned 127 
    (0x7F)    execution time 0.007 s 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts