我有以下错误.

libxml/tree.没有这样的文件或目录

我已经在我的项目中增加了libxml2.dylib个,但是我遇到了这样的麻烦.

推荐答案

按照"设置项目文件"下的说明here进行操作

设置项目文件

您需要添加libxml2.将动态库添加到项目中(不要将其放在框架部分).在Mac上,

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相关问答推荐

导航回上一个视图控制器

单例实例与类方法

iOS9 - 这个应用程序正在从后台线程修改自动布局引擎 - 在哪里?

如何在没有 Interface Builder 的情况下创建 Cocoa 接口?

self.ivar 和 ivar 之间的区别?

在 ARC 之后,我应该为调度队列使用什么属性?

为什么 UICollectionView 的 UICollectionViewCell 没有在用户时突出显示?

碰撞技术如何运作?

NSUserDefaults 的限制是什么?

如何以编程方式退出 mac 应用程序?

Interface Builder 中的 IBOutletCollection 集排序

我们可以在 UIPageViewController 中自定义页面指示器吗?

从 NSString 中删除换行符

Objective-C 中的非正式协议?

通过索引访问 NSMutableDictionary 中的对象

在 UITableView 的 iOS 文档目录中列出保存的文件?

如何让 UITextView 检测网站、邮件和电话号码的链接

UIScrollView contentSize 不起作用

UIPageViewController,如何在不打乱数据源指定顺序的情况下正确跳转到特定页面?

iOS中的活动生命周期相当于什么?