Reputation: 23
I have some hardtime compiling an application with QT using the jsonRpc library :
- libjson-rpc-cpp
- jsoncpp
When compiling, I have this error :
Undefined symbols for architecture x86_64:
Json::Value::operator=(Json::Value const&)", referenced from:
jsonrpc::RpcProtocolServerV1::WrapException(Json::Value const&, jsonrpc::JsonRpcException const&, Json::Value&) in libjson-rpc-cpp.a(rpcprotocolserverv1.o)
jsonrpc::RpcProtocolServerV1::WrapResult(Json::Value const&, Json::Value&, Json::Value&) in libjson-rpc-cpp.a(rpcprotocolserverv1.o)
jsonrpc::RpcProtocolServerV1::WrapError(Json::Value const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Json::Value&) in libjson-rpc-cpp.a(rpcprotocolserverv1.o)
jsonrpc::RpcProtocolServerV2::WrapException(Json::Value const&, jsonrpc::JsonRpcException const&, Json::Value&) in libjson-rpc-cpp.a(rpcprotocolserverv2.o)
jsonrpc::RpcProtocolServerV2::WrapResult(Json::Value const&, Json::Value&, Json::Value&) in libjson-rpc-cpp.a(rpcprotocolserverv2.o)
jsonrpc::RpcProtocolServerV2::WrapError(Json::Value const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Json::Value&) in libjson-rpc-cpp.a(rpcprotocolserverv2.o)
jsonrpc::AbstractProtocolHandler::ProcessRequest(Json::Value const&, Json::Value&) in libjson-rpc-cpp.a(abstractprotocolhandler.o)
...
I try to find in value.h the definition of the overload = operator and I find this :
Value& operator=(Value other);
It's probably something to do with a linker issue, but I really don't know how to resolve it..
Can anyone please give me some help with this ?
Thank you
Upvotes: 1
Views: 673
Reputation: 356
I had the same error when compiling OSVR. The source of the problem was outdated jsoncpp headers in /usr/local/include.
What worked for me:
Build and install jsoncpp, including dynamic library, from github source:
Upvotes: 1
Reputation: 23
In fact, the version of libjson-rpc-cpp.a was compile with a non update source of jsoncpp library. So I re-generate a libjson-rpc-cpp.a updated and now it works.
Upvotes: 0