Skip to content

httpclient has linker issues #327

Description

@situ-s

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions