Gooddbird / tinyrpc

c++ async rpc framework. 14w+qps.
Apache License 2.0
1.29k stars 189 forks source link

error:no such file <tinyxml/tinyxml.h> #5

Open lanpoo opened 2 years ago

lanpoo commented 2 years ago

When I compile the project, the error message is In file included from tinyrpc/comm/log.cc:16: tinyrpc/comm/config.h:4:10: fatal error: tinyxml/tinyxml.h: No such file or directory How should I solve it?

Gooddbird commented 2 years ago

Hi, you should install 'tinyxml' library first.

https://github.com/leethomason/tinyxml2

Gooddbird commented 2 years ago

or this link address 'https://sourceforge.net/projects/tinyxml/'

Gooddbird commented 2 years ago

1. Modify 85 line in makefile of tinyxml form 'OUTPUT := xmltest' to 'OUTPUT := libtinyxml.a '

  1. make
  2. copy libtinyxml.a to your sys lib path like '/usr/lib'
  3. copy all '%.h' file in tinyxml to your sys include path like '/usr/include'
Gooddbird commented 2 years ago

... 还以为你不是中国人。 害我编了大堆英语。 感谢对此项目的关注。目前可能还有些 BUG 没优化,如果遇到啥问题欢迎随时反馈。

tinyxml 的安装可以参考: https://blog.csdn.net/lcli2009/article/details/21445805

lanpoo commented 2 years ago

... 还以为你不是中国人。 害我编了大堆英语。 感谢对此项目的关注。目前可能还有些 BUG 没优化,如果遇到啥问题欢迎随时反馈。

tinyxml 的安装可以参考: https://blog.csdn.net/lcli2009/article/details/21445805

哈哈哈好的,谢谢,我会照着试试的。感谢您的回答~一开始用英语提问是因为我的虚拟机里没有装中文输入法hhhh

Gooddbird commented 2 years ago

顺便提下,拷贝的时候要注意路径。 tinyxml.h 前面还有个 tinyxml 路径,所以拷贝到 /lib/ 目录下时可以先建立个 tinyxml 文件夹,再往里拷贝 .h 文件。

lanpoo commented 2 years ago

好,万分感谢!很难得能遇到您这么有耐心的作者了,知乎给您点关注了~🤭

lanpoo commented 2 years ago

很抱歉又来打扰您,关于_tinyxml2_的依赖库问题我已经解决了。但是紧接着它又爆了个错。 fatal error: google/protobuf/message.h: No such file or directory 请问关于这个库,我该去哪个git仓库下安装呢?

Gooddbird commented 2 years ago

您好,需要安装 google 的 protobuf 库。 https://github.com/protocolbuffers/protobuf 可以百度一下安装方法

wangseem commented 1 year ago

大哥,头文件和库都有但是出现未定义标识符是怎么回事儿啊 ‘TiXmlElement’ has not been declared void readDBConfig(TiXmlElement* node);