tinyrpc icon indicating copy to clipboard operation
tinyrpc copied to clipboard

testcast执行失败

Open bugcat9 opened this issue 2 years ago • 4 comments

安装完成后想运行一下testcast的例子,运行失败了。运行的命令如下

g++ test_tinypb_server.cc ../lib/libtinyrpc.a -o test_tinypb_server 

报的错误是找不相关引用,比如:

/usr/bin/ld: /tmp/ccBramt5.o:(.data.rel.ro._ZTV16QueryServiceImpl[_ZTV16QueryServiceImpl]+0x30): undefined reference to `QueryService::GetRequestPrototype(google::protobuf::MethodDescriptor const*) const'

/root/tinyrpc-main/tinyrpc/comm/config.cc:31: undefined reference to `TiXmlElement::GetText() const'
/usr/bin/ld: /root/tinyrpc-main/tinyrpc/comm/config.cc:35: undefined reference to `TiXmlElement::GetText() const'

bugcat9 avatar Jul 01 '23 06:07 bugcat9

您好,已收到您的来信,谢谢!

AIGC-yuxincai avatar Jul 01 '23 06:07 AIGC-yuxincai

你好,需要链接libtinyxml 和 libprotobuf库

Gooddbird avatar Jul 01 '23 18:07 Gooddbird