简体   繁体   English

将libxml2添加到项目时出错

[英]Error adding libxml2 to project

I am getting this error: 我收到此错误:

/Users/AppleMacbook/Documents/Tab/Tab/../../../Downloads/GDataXMLNode.h:38:24: error: libxml/tree.h: No such file or directory /Users/AppleMacbook/Documents/Tab/Tab/../../../Downloads/GDataXMLNode.h:38:24:错误:libxml / tree.h:没有此类文件或目录

I have added these two properly: 我已经正确添加了这两个:

/usr/include/libxml2

other linkers flags   -lxml2

Still I am getting an error saying that tree.h is not present. 我仍然收到一个错误消息,说不存在tree.h。 I opened that folder, it's there! 我打开了那个文件夹,它在那里!

Could you please help me with this? 你能帮我这个忙吗?

Do you need /usr/include/ instead or in addition? 您是否需要/ usr / include /替代还是另外需要? I notice it's looking for libxml/tree.h but you're including /usr/include/libxml2 ? 我注意到它正在寻找libxml / tree.h,但是您要包含/ usr / include / libxml2吗?

you need to specify an include path, in addition to a linker path -I/usr/include/libxml2/libxml , just specify the path ( /usr/include/libxml2/libxml ) in the build settings. 除了链接器路径-I/usr/include/libxml2/libxml ,您还需要指定一个包含路径,只需在构建设置中指定路径( /usr/include/libxml2/libxml )。 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM