c++ - cURLcpp error while compiling source -


i kinda new c++ , use of github. want use curl functionality in c++. therefore first forked curlcpp (by josephp91) github, , followed instructions readme.txt.

now error when executing

make # -j2 

(with or without -j2 makes no difference).

the error:

[ 12%] building cxx object src/cmakefiles/curlcpp.dir/curl_easy.cpp.o in file included /home/user/.git/curlcpp/src/curl_easy.cpp:6:0: /home/user/.git/curlcpp/include/curl_easy.h:276:31: error: ‘curlopt_obsolete72’ not declared in scope          curlcpp_define_option(curlopt_obsolete72, long); /* obsolete, not use! */                                ^ /home/user/.git/curlcpp/include/curl_easy.h:47:33: note: in definition of macro ‘curlcpp_define_option’      template <> struct option_t<opt> {\                                  ^ /home/user/.git/curlcpp/include/curl_easy.h:47:36: error: template argument 1 invalid      template <> struct option_t<opt> {\                                     ^ /home/user/.git/curlcpp/include/curl_easy.h:276:9: note: in expansion of macro ‘curlcpp_define_option’          curlcpp_define_option(curlopt_obsolete72, long); /* obsolete, not use! */          ^ make[2]: *** [src/cmakefiles/curlcpp.dir/curl_easy.cpp.o] error 1 make[1]: *** [src/cmakefiles/curlcpp.dir/all] error 2 make: *** [all] errors 2 

thank guys in advance helping me!

edit:

output of

cmake 

output:

-- c compiler identification gnu 4.8.2 -- cxx compiler identification gnu 4.8.2 -- check working c compiler: /usr/bin/cc -- check working c compiler: /usr/bin/cc -- works -- detecting c compiler abi info -- detecting c compiler abi info - done -- check working cxx compiler: /usr/bin/c++ -- check working cxx compiler: /usr/bin/c++ -- works -- detecting cxx compiler abi info -- detecting cxx compiler abi info - done -- found curl: /usr/lib/x86_64-linux-gnu/libcurl.so (found suitable version "7.35.0", minimum required "7.28.0")  -- configuring done -- generating done -- build files have been written to: /home/user/.git/curlcpp/build 

you need update libcurl fron version 7.35.0 7.37.1 on ubuntu, libcurl 7.31 available on utopic repository (http://packages.ubuntu.com/utopic/libcurl4-nss-dev).

you can use apt-get update doing:

echo "deb http://archive.ubuntu.com/ubuntu/ utopic main restricted" | sudo tee /etc/apt/sources.list apt-get update apt-get upgrade libcurl4-nss-dev 

and redo cmake , make , should compile fine.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -