We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
luwei@haode:~/tinyrpc/testcases$ g++ test_tinypb_server.cc ../lib/libtinyrpc.a -o test_tinypb_server -lprotobuf -ltinyxml -lpthread -ldl /usr/bin/ld: /tmp/cckIA1Ib.o: in function QueryService::QueryService()': test_tinypb_server.cc:(.text._ZN12QueryServiceC2Ev[_ZN12QueryServiceC5Ev]+0x1f): undefined reference to vtable for QueryService' /usr/bin/ld: /tmp/cckIA1Ib.o: in function QueryServiceImpl::~QueryServiceImpl()': test_tinypb_server.cc:(.text._ZN16QueryServiceImplD2Ev[_ZN16QueryServiceImplD5Ev]+0x26): undefined reference to QueryService::~QueryService()' /usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x20): undefined reference to QueryService::GetDescriptor()' /usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x28): undefined reference to QueryService::CallMethod(google::protobuf::MethodDescriptor const*, google::protobuf::RpcController*, google::protobuf::Message const*, google::protobuf::Message*, google::protobuf::Closure*)' /usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x30): undefined reference to QueryService::GetRequestPrototype(google::protobuf::MethodDescriptor const*) const' /usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x38): undefined reference to QueryService::GetResponsePrototype(google::protobuf::MethodDescriptor const*) const' /usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTI16QueryServiceImpl[_ZTI16QueryServiceImpl]+0x10): undefined reference to `typeinfo for QueryService' collect2: error: ld returned 1 exit status 我再使用了g++ test_tinypb_server.cc ../lib/libtinyrpc.a -o test_tinypb_server -lprotobuf -ltinyxml -lpthread -ldl编译之后QueryService()报错,应该如何解决。
QueryService::QueryService()': test_tinypb_server.cc:(.text._ZN12QueryServiceC2Ev[_ZN12QueryServiceC5Ev]+0x1f): undefined reference to
QueryServiceImpl::~QueryServiceImpl()': test_tinypb_server.cc:(.text._ZN16QueryServiceImplD2Ev[_ZN16QueryServiceImplD5Ev]+0x26): undefined reference to
QueryService::GetDescriptor()' /usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x28): undefined reference to
QueryService::GetRequestPrototype(google::protobuf::MethodDescriptor const*) const' /usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x38): undefined reference to
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
luwei@haode:~/tinyrpc/testcases$ g++ test_tinypb_server.cc ../lib/libtinyrpc.a -o test_tinypb_server -lprotobuf -ltinyxml -lpthread -ldl
/usr/bin/ld: /tmp/cckIA1Ib.o: in function
QueryService::QueryService()': test_tinypb_server.cc:(.text._ZN12QueryServiceC2Ev[_ZN12QueryServiceC5Ev]+0x1f): undefined reference to
vtable for QueryService'/usr/bin/ld: /tmp/cckIA1Ib.o: in function
QueryServiceImpl::~QueryServiceImpl()': test_tinypb_server.cc:(.text._ZN16QueryServiceImplD2Ev[_ZN16QueryServiceImplD5Ev]+0x26): undefined reference to
QueryService::~QueryService()'/usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x20): undefined reference to
QueryService::GetDescriptor()' /usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x28): undefined reference to
QueryService::CallMethod(google::protobuf::MethodDescriptor const*, google::protobuf::RpcController*, google::protobuf::Message const*, google::protobuf::Message*, google::protobuf::Closure*)'/usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x30): undefined reference to
QueryService::GetRequestPrototype(google::protobuf::MethodDescriptor const*) const' /usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x38): undefined reference to
QueryService::GetResponsePrototype(google::protobuf::MethodDescriptor const*) const'/usr/bin/ld: /tmp/cckIA1Ib.o:(.data.rel.ro._ZTI16QueryServiceImpl[_ZTI16QueryServiceImpl]+0x10): undefined reference to `typeinfo for QueryService'
collect2: error: ld returned 1 exit status
我再使用了g++ test_tinypb_server.cc ../lib/libtinyrpc.a -o test_tinypb_server -lprotobuf -ltinyxml -lpthread -ldl编译之后QueryService()报错,应该如何解决。
The text was updated successfully, but these errors were encountered: