objective-c - libxml/tree.h 没有这样的文件或目录

标签 objective-c iphone xcode libxml2

我收到以下错误。

libxml/tree.h no such file or directory

我已经将 libxml2.dylib 添加到我的项目中,但是我遇到了这种类型的麻烦。 请帮帮我。

最佳答案

按照指示here ,在“设置您的项目文件”下。

Setting up your project file

You need to add libxml2.dylib to your project (don't put it in the Frameworks section). On the Mac, you'll find it at /usr/lib/libxml2.dylib and for the iPhone, you'll want the /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/usr/lib/libxml2.dylib version.

Since libxml2 is a .dylib (not a nice friendly .framework) we still have one more thing to do. 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

另见 the OP's answer .

关于objective-c - libxml/tree.h 没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1428847/

相关文章:

ios - 当我 Handlebars 机放平时,UIDevice 方向不断在 UIDeviceOrientationPortrait 和 UIDeviceOrientationLandscapeRight 之间翻转

ios - 当点击 UIcollectionviewcell 放大单元格照片并打开新的 View Controller 时

ios - 将一个大的 swift 项目拆分为具有核心框架和模块框架的框架

ios - 如何键入自动完成中显示的方法名称的下一部分?

ios - 找不到图书馆

objective-c - 使用 GCD 创建高优先级串行调度队列

iphone - 更新框架后 UITextView 不滚动

ios - Apple Watch、WatchKit 和 NSUserDefaults

swift - 有没有办法更改一组按钮上的文本输入?

ios - 是否可以在 Afnetworking POST 方法中发布字典数组?