Skip to content
New issue

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

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

Open
lanpoo opened this issue May 10, 2022 · 10 comments
Open

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

lanpoo opened this issue May 10, 2022 · 10 comments

Comments

@lanpoo
Copy link

lanpoo commented May 10, 2022

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
Copy link
Owner

Hi, you should install 'tinyxml' library first.

https://github.com/leethomason/tinyxml2

@Gooddbird
Copy link
Owner

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

@Gooddbird
Copy link
Owner

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
Copy link
Owner

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

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

@lanpoo
Copy link
Author

lanpoo commented May 10, 2022

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

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

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

@Gooddbird
Copy link
Owner

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

@lanpoo
Copy link
Author

lanpoo commented May 10, 2022

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

@lanpoo
Copy link
Author

lanpoo commented May 10, 2022

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

@Gooddbird
Copy link
Owner

Gooddbird commented May 11, 2022

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

@wangseem
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants