Getting below error
I'm trying to install restc-cpp on Ubuntu 16.04.
I'm getting below error
[ 21%] Built target externalLest
[ 44%] Built target restc-cpp
[ 46%] Linking CXX executable http_reply_tests
../../lib/librestc-cpp.a(RestClientImpl.cpp.o): In function `boost::asio::ssl::context::context(boost::asio::ssl::context_base::method)':
RestClientImpl.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x70): undefined reference to `SSLv2_method'
RestClientImpl.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0x8c): undefined reference to `SSLv2_client_method'
RestClientImpl.cpp:(.text._ZN5boost4asio3ssl7contextC2ENS1_12context_base6methodE[_ZN5boost4asio3ssl7contextC5ENS1_12context_base6methodE]+0xa8): undefined reference to `SSLv2_server_method'
collect2: error: ld returned 1 exit status
tests/unit/CMakeFiles/http_reply_tests.dir/build.make:111: recipe for target 'tests/unit/http_reply_tests' failed
make[2]: *** [tests/unit/http_reply_tests] Error 1
CMakeFiles/Makefile2:228: recipe for target 'tests/unit/CMakeFiles/http_reply_tests.dir/all' failed
make[1]: *** [tests/unit/CMakeFiles/http_reply_tests.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Please help me to resolve this
It may be related to this: https://stackoverflow.com/questions/8206546/ubuntu-and-undefined-symbol-for-sslv2-method
But I really don't understand why you get this message. Are you using the libboost-dev package from Ubuntu?
Hi, I can install restc-cpp. But I can't call the API. what is the procedure add the library to G++ compiler? I'm trying in ubuntu.
You have several alternatives, depending on how you build your own project. https://github.com/jgaa/restc-cpp/tree/master/examples is a good starting point.