Compiler: gcc and/or g++
Linux: Mac OS X 10.6.7
curlpp version: 0.7.3

-Hi

I am having trouble compiling my cpp program, I am just trying to do an example from the curlpp website http://tinyurl.com/3auvcjo . I am using that code exactly. Also I've tried to search online to see what other people did for this problem.

This http://tinyurl.com/447x7gr directed me to another link which is further down that page, that told me to add some other libs within my curlpp libs. But still nothing worked :(. That link is this http://tinyurl.com/3crm6sv.

Here are my errors I am getting. It seems simple enough yes, that it does not recognize the location of the .hpp libs I am trying to use. I've tried to use the actual path to the curlpp libs with my command to run it, but still nothing...I also get the same error compiling with g++.

sagareu:cpp Zach$ gcc curl_00.cpp 
curl_00.cpp:1:29: error: curlpp/cURLpp.hpp: No such file or directory
curl_00.cpp:2:27: error: curlpp/Easy.hpp: No such file or directory
curl_00.cpp:3:30: error: curlpp/Options.hpp: No such file or directory
curl_00.cpp:5: error: ‘curlpp’ has not been declared
curl_00.cpp:5: error: ‘options’ is not a namespace-name
curl_00.cpp:5: error: expected namespace-name before ‘;’ token
curl_00.cpp: In function ‘int main(int, char**)’:
curl_00.cpp:11: error: ‘curlpp’ has not been declared
curl_00.cpp:11: error: expected `;' before ‘myCleanup’
curl_00.cpp:14: error: ‘curlpp’ has not been declared
curl_00.cpp:14: error: expected `;' before ‘myRequest’
curl_00.cpp:18: error: ‘myRequest’ was not declared in this scope
curl_00.cpp:18: error: ‘URL’ was not declared in this scope
curl_00.cpp:27: error: expected type-specifier before ‘curlpp’
curl_00.cpp:27: error: expected `)' before ‘:’ token
curl_00.cpp:27: error: expected `{' before ‘:’ token
curl_00.cpp:27: error: expected primary-expression before ‘:’ token
curl_00.cpp:27: error: expected `;' before ‘:’ token
curl_00.cpp:32: error: expected primary-expression before ‘catch’
curl_00.cpp:32: error: expected `;' before ‘catch’

I figured it out. Since I'm not to familiar with c++ and how gcc and g++ compilers and linkers work, I didn't know I had to place some other arguments when I ran the command to compile and link my code. I had installed curlpp into /opt/curlpp/ instead of the normal /usr/lib/. So what I first came up with was this line. g++ -I/opt/curlpp/include/ -L/opt/curlpp/lib/ -lcurlpp -lutilspp curl_00.cpp Then I just went ahead and did this, and to make things easier for me just threw it into a bash script :) g++ `/opt/curlpp/bin/curlpp-config --cflags` `/opt/curlpp/bin/curlpp-config --libs` curl_00.cpp

This question has already been answered. Start a new discussion instead.