如何在Eclipse Indigo CDT C ++中设置libxml [英] How do I setup libxml in Eclipse Indigo CDT C++

查看:71
本文介绍了如何在Eclipse Indigo CDT C ++中设置libxml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有这些都在Mac OS X 10.6下,并且libxml库似乎在/ usr / local / libxml2 / libxml中,我将其添加到了GNU C ++支持中,但是使用libxml的代码仍然出现错误。我找不到任何能解释如何使其正常工作以及我的项目可以编译的内容。

This all is under Mac OS X 10.6 and the libxml libraries seem to be in /usr/local/libxml2/libxml, I added this to the GNU C++ support but still I get errors for the code that uses libxml. I couldn't find anything that explains what to do to get it working and my project to compile.

编辑:示例错误

void printElementNames(xmlNode * a_node) {

}

这将给出无法解析xmlNode类型。

This would give "Type xmlNode could not be resolved".

推荐答案

此处:论坛


  1. 右键单击CDT项目,然后选择属性

  2. 展开 C / C ++ General ,然后选择路径和符号

  3. 在语言下选择 GNU C ++

  4. 单击添加定义新元素

  5. 在目录字段中写入/ usr / local / libxml2 / libxml

  6. 重建

  1. Right-click your CDT project and select Properties.
  2. Expand C/C++ General and select Paths and Symbols.
  3. Select GNU C++ under Languages
  4. Click Add to define new element
  5. Write in the Directory field /usr/local/libxml2/libxml
  6. Re-build

这篇关于如何在Eclipse Indigo CDT C ++中设置libxml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆