libxml/tree.h file not found

stackoverflow用户对添加libxml2库表现出了极大的抱怨 ,原因在要把它好好地添加进去实在是太复杂了。

我就是因为出现了‘libxml/tree.h file not found’错误,才发现的这篇贴子,照着做,错误就消除了,备注如下:

原始地址:http://stackoverflow.com/questions/1428847/libxml-tree-h-no-such-file-or-directory

e.w. parris的答案

Adding libxml2 is a big, fat, finicky pain in the ass. If you‘re going to do it, do it before you get too far in building your project.



You need to add it in two ways:

1. Target settings

Click on your target (not your project) and select Build Phases.

Click on the reveal triangle titled Link Binary With Libraries. Click on the + to add a library.

Scroll to the bottom of the list and select libxml2.dylib. That adds the libxml2 library to your project.

2. Project settings

Now you have to tell your project where to look for it three more times.

Select the Build Settings tab.

Scroll down to the Linking section. Under your projects columns double click on the Other Linker Flags row. Click the + and add -lxml2 to the list.

Still more.

In the same tab, scroll down to the Search Paths section.

Under your projects column in the Framework Search Paths row add /usr/lib/libxml2.dylib.

In the Header Search Paths and the User Header Search Paths row add $(SDKROOT)/usr/include/libxml2.

In those last two cases make sure that path is entered in Debug and Release.

3. Clean

Under the Product Menu select Clean.

Then, if I were you (and lets face it, I probably am) I‘d quit Xcode and walk away. When you come back and launch you should be good to go.

libxml/tree.h file not found

时间: 2024-10-12 04:30:55

libxml/tree.h file not found的相关文章

XML解析适配 'libxml/tree.h'file not found 错误解决办法

Xcode 'libxml/tree.h'file not found 错误解决办法 在工程的"Build Settings"页中找到"Header Search Path"项,添加"/usr/include/libxml2".在"Other Linker Flags"项,添加"-lxml2" XML解析适配 'libxml/tree.h'file not found 错误解决办法

UI进阶 XML解析适配 'libxml/tree.h'file not found 错误解决办法

Xcode 'libxml/tree.h'file not found 错误解决办法 在工程的"Build Settings"页中找到"Header Search Path"项,添加"/usr/include/libxml2".在"Other Linker Flags"项,添加"-lxml2" UI进阶 XML解析适配 'libxml/tree.h'file not found 错误解决办法

UI进阶 XML解析适配 引入GDataXML文件时候 'libxml/tree.h'file not found 错误解决办法

在工程的"Build Settings"页中找到"Header Search Path"项,添加"/usr/include/libxml2". 在"Other Linker Flags"项,添加"-lxml2" 同理引入别的类型文件不匹配的时候也可以用这种方法 UI进阶 XML解析适配 引入GDataXML文件时候 'libxml/tree.h'file not found 错误解决办法

fatal error: 'libxml/xmlversion.h' file not found

问题: MACOS安装scrapy时,安装lxml出现错误 In file included from src/lxml/lxml.etree.c:232: /tmp/easy_install-O2UfP7/lxml-3.4.0/src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found #include "libxml/xmlversion.h"          ^

iOS_导入libxml2.2框架后,找不到<libxml/tree.h>的解决办法

由于用到了第三方Html解析类库Hpple, 在导入框架libxml2.2.dylib后, 最到了XCode仍然找不到<libxml/tree.h>的情况, 最后解决过程如下: 1.项目-Targets中的Build Phases, 找到Link Binary With Libraries, 点击"+",添加 "libxml2.dylib" 2.同样的,切换到Buiild Settings的tab里, 通过搜索,找到"Linking"

libxml/HTMLparser.h file not found

在导入asihttprequest包时出问题导入了libxml2.dylib.可是却提示libxml/HTMLparser.h file not found. 这是由于你的开发环境默认的路径无法找到这个libxml2.dylib框架. 改动方法:(1)第一种方法:(我的可行)点击左边项目的根文件夹,再点击右边的Build Settings,手工输入文字:"Header search paths".然后单击(或双击.点击弹出面板以下的"+"号进行加入)"He

libxml2.dylb 导致&lt;libxml/tree.h&gt; 老是找不到头文件

添加了libxml2.dylb的framework ,结果还是引用不了<libxml/tree.h>,  老是提示找不到头文件. 这个问题其实比较容易解决,但是XCode的版本问题确实让开发者头疼. 在Xcode4,2之后,可以在添加了libxml2.dylb之后,点击左上角的project,然后进行Build Settings(这里不管是Project还是targets都行),找到Search Paths选项卡,其下有Header Search Paths条目,双击debug选项,添加/us

libxml/tree.h not found(XCode 4.5&amp;5.1解决方案)

我用的XCode版本是5.1,遇到一种奇怪的编译错误:libxml/tree.h not found.查了一些文章,按照一篇XCode 4.5的解决方案解决了这个问题.我觉得应该有不少人遇到这种问题,这里分享一下. [注]至少我这里是可以解决的,确定无误,如果您看了我的文章没解决了您的问题,求轻喷……可能是有差异. [解决方案] 步骤1: 工程->PROJECT->Build Settings 将“Header Search Paths”的值设置为<${SDK_DIR}/usr/incl

libxml/tree.h no such file or directory

最后一个 国外的帖子帮我解决了问题: http://stackoverflow.com/questions/1428847/libxml-tree-h-no-such-file-or-directory  (我是翻墙的) 我执行的步骤: 1. Target settings Click on your target (not your project) and select Build Phases. Click on the reveal triangle titled Link Binary