libjson-rpc-cpp icon indicating copy to clipboard operation
libjson-rpc-cpp copied to clipboard

httpclient has linker issues

Open situ-s opened this issue 1 year ago • 0 comments

Tried running stubclient as per given in the instructions. Errors below:

Platform: Ubuntu machine where all the dependencies are installed as per instructions.

➜  examples git:(master) ✗ g++ stubclient.cpp -ljsoncpp -lcurl -ljsonrpccpp-common -ljsonrpccpp-client -o sampleclient

In file included from stubclient.cpp:12:
gen/stubclient.h:15:55: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   15 |         std::string sayHello(const std::string& name) throw (jsonrpc::JsonRpcException)
      |                                                       ^~~~~
gen/stubclient.h:25:29: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   25 |         void notifyServer() throw (jsonrpc::JsonRpcException)
      |                             ^~~~~
gen/stubclient.h:31:48: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   31 |         int addNumbers(int param1, int param2) throw (jsonrpc::JsonRpcException)
      |                                                ^~~~~
gen/stubclient.h:42:58: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   42 |         double addNumbers2(double param1, double param2) throw (jsonrpc::JsonRpcException)
      |                                                          ^~~~~
gen/stubclient.h:53:56: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   53 |         Json::Value calculate(const Json::Value& args) throw (jsonrpc::JsonRpcException)
      |                                                        ^~~~~
gen/stubclient.h:63:76: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   63 |         bool isEqual(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
      |                                                                            ^~~~~
gen/stubclient.h:74:72: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   74 |         Json::Value buildObject(const std::string& param1, int param2) throw (jsonrpc::JsonRpcException)
      |                                                                        ^~~~~
gen/stubclient.h:85:47: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   85 |         std::string methodWithoutParameters() throw (jsonrpc::JsonRpcException)
      |                                               ^~~~~
/usr/bin/ld: /tmp/ccZFiFaP.o: in function `StubClient::StubClient(jsonrpc::IClientConnector&, jsonrpc::clientVersion_t)':
stubclient.cpp:(.text._ZN10StubClientC2ERN7jsonrpc16IClientConnectorENS0_15clientVersion_tE[_ZN10StubClientC5ERN7jsonrpc16IClientConnectorENS0_15clientVersion_tE]+0x2b): undefined reference to `jsonrpc::Client::Client(jsonrpc::IClientConnector&, jsonrpc::clientVersion_t, bool)'
collect2: error: ld returned 1 exit statu

situ-s avatar Nov 29 '23 14:11 situ-s