我收到以下错误。
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 .
https://stackoverflow.com/questions/1428847/
相关文章:
iphone - 为 UIView 子类加载 Nib 的正确方法
objective-c - 如何将 int 转换为 NSString?
objective-c - 如何在 Objective-C 中检测未使用的方法和#import
objective-c - Swift native 基类或 NSObject
ios - 如何检查 View Controller 是否以模态方式呈现或推送到导航堆栈上?
ios - 正确使用 beginBackgroundTaskWithExpirationHandle
iphone - 即使图像较小,如何使 UITableViewCell 的 ImageView 成为