|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| luq (32) | |
|
Hey, I've managed to install libcurl and curl on my Ubuntu 9.04 system. But now I want to install curlpp @ www.curlpp.org. But I can't find any reference on how to do it on a LINUX system. (I need it, because I want to use C++ instead of C). Thanks! | |
|
|
|
| JCED (118) | |
|
Download this: http://curlpp.googlecode.com/files/curlpp-0.7.2.tar.gz Then, in the terminal, navigate to where you downloaded that file (if you're unfamiliar with the terminal, the command ls will LiSt the contents of the current directory, cd will Change Directories, and pwd will Print the Working Directory (show what directory you're in). Execute these commands when you get there: tar -xvvf curlpp-0.7.2.tar.gz cd curlpp-0.7.2 ./configure If at the end of that last command, if you get errors, then attempt to install the packages that it mentions as missing (via sudo apt-get install <package-name>) Then run again. Do this until all errors are gone. If the errors persist and you don't know what to do, just post the errors here. When that command is successful, run these commands: make sudo make install After this, you should have the files installed correctly, and ready to be used. Post back if you encounter any problems. Good luck! | |
|
Last edited on
|
|
| luq (32) | |||
Configuring was all right, I had to install libboost, and all problems we're fixed. But the make command gave a couple of errors:
I can't find any reference to a package in there, I have totally no idea what to do.. can you help me out again? Thanks! | |||
|
|
|||
| luq (32) | |||
Thanks to this thread: http://www.mail-archive.com/curlpp@googlegroups.com/msg00002.html I almost have curlpp up and running. I've did some things different then stated in the thread: I've replaced examples 18 and 13 with a simple:
And I think everything compiled well. So I tried to link the curlpp library in my Code::Blocks IDE. It seems like its in /usr/local/lib/libcurlpp.so or something. So in the linker tab from Settings > Debugger & Compiler I've added this one. In the search directories tab, I've added /usr/local/include/ to the compiler, and /usr/local/lib/ to the linker tab. But it keeps on saying curl/curlpp.hpp directory or file cannot be found, when I try to compile a file requiring those headers.... What did I do wrong? | |||
|
|
|||
| seymore15074 (449) | |
|
I've never used this library or an IDE but the first thing I would do is find curl/curlpp.hpp. Then verify that there is a -I[that path] in the compile command line. With g++, some of the more common things to pay attention to during compilation are -L[lib path] -l[lib] -I[inc path]. For more information, try: > man gcc | |
|
Last edited on
|
|
| computerquip (1682) | |
| A lot of the time, packages like this can be configured using pkg-config. Pretty useful tool if ya ask me. Also, I suggest your research autoconf, automake, makefiles, and configuration scripts. | |
|
Last edited on
|
|
| luq (32) | |||
I've tried it using pkg-config, but it didn't make any difference.
Errors are still the same.. @seymore I'm using an IDE, can I see those -L[lib path] things in the compiler window of the IDE too, or do I've to compile it like: gcc -o simple simple.cppI'll look up some things on gcc in the terminal. Btw it isn't really a package, it's a tarball (or is that the same thing :P) not a deb file or something ;-) | |||
|
|
|||
| anilpanicker (102) | |||
|
You need to compile with the library path, library name, and include directory path Make sure all your paths are correct
| |||
|
|
|||
| luq (32) | |||||
|
I've tried that but the same errors remain... I lost the error that says: /curl/curlpp.hpp not found, but I still get all the other "not declared" errors... I've also tried to copy the includes and the library to the normal path (which works with libcurl) /usr/include/ and /usr/lib/ but that didn't work either :S I'm getting these errors now:
On this script:
All the includes files exists in the directories I allready mentioned.. Hope this helps solving the problem. | |||||
|
Last edited on
|
|||||
| luq (32) | |
| No other ideas? | |
|
|
|
| ImagE (3) | |
| why you don't install g++ ? sudo apt-get install build-essential | |
|
|
|
| JCED (118) | |
|
I've never used curlpp, but looking here: http://api.curlpp.org/namespaces.html It doesn't seem like there is a curlpp::options namespace... is that an example provided by curlpp.org? | |
|
Last edited on
|
|
| javavall (1) | ||
I have the same problem. I tried renaming example 13 and 18, but still i have the same problem. Any ideas? | ||
|
|
||
| delacruz (1) | |||
curlpp example:
| |||
|
|
|||
| seymore15074 (449) | |
|
Sorry I haven't kept up with this thread. Anyway, post the command line for compiling. We need to see the "gcc or g++ etc etc"-thing that your IDE is using and any errors. If something is "not declared" there is probably a header file missing or its some kind of typo (such as case mentioned above). Use a case-insensitive grep to try and find where that item actually IS declared, then make sure you are including it. | |
|
|
|