xcode 为 #import <libxml/HTMLparser.h> 导入什么库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10347595/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 00:06:46  来源:igfitidea点击:

What library to import for #import <libxml/HTMLparser.h>

iphonexcodeasihttprequest

提问by adrian

I have imported ASIHTTP filesinto my project and inside ASIWebPageRequest.mthere is the following import:

我已经导入ASIHTTP files到我的项目中,里面 ASIWebPageRequest.m有以下导入:

#import <libxml/HTMLparser.h>

which is not recognized. What library should I add in order to be recognized?

这是不被认可的。我应该添加什么库才能被识别?

回答by Maulik

Go to the Project build settings (Project->Edit Project Settings->Build) and find the "Search Paths". In "Header Search Paths" add the following path:

转到项目构建设置(项目->编辑项目设置->构建)并找到“搜索路径”。在“标题搜索路径”中添加以下路径:

$(SDKROOT)/usr/include/libxml2

$(SDKROOT)/usr/include/libxml2

Note, you may be missing all development headers after upgrading OS X (at least this was the case for me with Mavericks). To reinstall the command line tools run:

请注意,升级 OS X 后您可能会丢失所有开发头文件(至少我在 Mavericks 中就是这种情况)。要重新安装命令行工具,请运行:

xcode-select --install

xcode-select --install

回答by tnthuong

With xcode 4.5, it doesn't work. I try with /usr/include/libxml2 and it works well

使用 xcode 4.5,它不起作用。我尝试使用 /usr/include/libxml2 并且效果很好

回答by Amogh Natu

putting ${SDK_DIR}/usr/include/libxml2for the "Header Search Paths" build setting worked for me.

放置${SDK_DIR}/usr/include/libxml2“标题搜索路径”构建设置对我有用。

*Info: I'm using xcode 5

*信息:我使用的是 xcode 5