iphone - iOS : Errors while compiling projet with MGTwitterEngine

标签 iphone ios libxml2 mgtwitterengine

我在编译我的项目时在某些机器上遇到这个错误:

Undefined symbols for architecture armv6:
"_xmlFree", referenced from:
-[MGTwitterLibXMLParser initWithXML:delegate:connectionIdentifier:requestType:responseType:URL:]     in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _nodeValueAsString] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _nodeValueAsDate] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _nodeValueAsInt] in MGTwitterLibXMLParser.o
-[MGTwitterLibXMLParser _nodeValueAsBool] in MGTwitterLibXMLParser.o

它在模拟器模式下编译良好,但在设备(ios 4.3)下却不行

如何摆脱这个?

最佳答案

将 libxml2 框架添加到您的目标。

在 Xcode 3 中,您可以通过右键单击边栏中的“框架”并选择“添加现有框架”来完成此操作。抱歉,我不知道你是如何在 Xcode 4 中做到这一点的。

来自 MGTwitterEngine 自述文件:

  1. Add libxml2.dylib in Other Frameworks. You'll find the library in:

    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/lib/libxml2.dylib

  2. Add "$SDKROOT/usr/include/libxml2" as a Header Search Path in your Project Settings.

关于iphone - iOS : Errors while compiling projet with MGTwitterEngine,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6122539/

相关文章:

c - Libxml2:输出带有属性和内容的 XML 元素

c++ - C++中的libxml2,如何设置编码

iphone - 为armv6-7构建ffmpeg失败

iphone - Objective-C++语言: where can I find more information about it?

ios - AVCaptureVideoPreviewLayer 的比例

ios - 停止不真实的 CloudKit 调用?

ios - Pods/RCT-Folly/folly/portability/Time.h 和不同类型的 Typedef 重新定义错误 ('uint8_t'(又名 'unsigned char')与 'enum clockid_t')

c - 如何使用 libxml2 修改现有的 xml 文件?

ios - Alamofire json 请求 Swift 3

iphone - 如何在ipad中获取指定宽度和高度的popover frame