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 - 在 Xcode 6/iOS 8 Interface Builder 启动屏幕中使用自定义字体

objective-c - GKachievement(游戏中心)正在显示?

objective-c - 在部分之间移动一行

objective-c - 加载受密码保护的网页

iphone - Objective-C : Accessing constants from other classes

iphone - 使用 UIManagedDocument 在 iOS 5 中预加载核心数据数据库

javascript - 来自带有 JSON 字符串的 webview 的 NSString

ios - 如何更改 Objective-C 中的 CBAdvertisementDataLocalNameKey 值?

iphone - ios7 xcode 5 GM : color of UIBarButtonItem and selected UISegmentedControl part on iOS 6 device keep default color

iphone - 想要在 iPad 中显示黑色键盘