【问题标题】:Twitter OAuth iPhone problemTwitter OAuth iPhone问题
【发布时间】:2011-06-08 09:06:53
【问题描述】:

我在我的 iPhone 和 iPad 程序上添加了一个 twitter 模块。 而且我遇到了两个问题。


第一,在 iPhone 上。 在我将 twitter 模块合并到我的 iPhone 程序后,仅在调试模式下构建失败。在发布模式下没问题。

错误信息很简单

Libxml/xmlreader.h: No such file or directory

是的,这是因为 gcc 无法找到它。 但我已经为其他链接器标志添加了-lxml2,并在发布和调试模式下的项目构建设置中为标题搜索路径添加了/usr/include/libxml2/**


第二,在 iPad 上。 将 twitter 模块合并到 iPad 程序后,构建失败并显示以下消息。

ld: duplicate symbol _OBJC_METACLASS_$_MGTwitterEngine in 
/Users/eddy/Documents/iOS/workspace/.../i386/MGTwitterEngine-3460BD6C4381A3AC.o and  
/Users/eddy/Documents/iOS/workspace/.../i386/MGTwitterEngine-CC42501E82512F61.o

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 
failed with exit code 1

我无法弄清楚此消息出现的原因。 现成的模块是否仅适用于 iPhone? 或者我该如何解决?

【问题讨论】:

  • 只是为了确认:您是否添加了 libxml2.dylib 和 libz.1.2.3.dylib 框架。

标签: iphone xcode ipad twitter build


【解决方案1】:
  1. 在项目设置的标头搜索路径字段中添加“/usr/include/libxml2”。

  2. 您已将 2 个同名文件(此处为 MGTwitterEngine)添加到同一目标。

【讨论】:

  • 谢谢尼廷。我解决了第二个问题。我不知道我的项目中有一些相同的文件,因为我在项目中添加了另一个程序员制作的一些附加功能。但是第一个,我已经添加了'/usr/include/libxml2'作为递归搜索,看起来链接'/usr/include/libxml2/**'。有没有嫌疑人?
猜你喜欢
  • 2011-07-16
  • 2011-02-22
  • 1970-01-01
  • 2011-04-16
  • 1970-01-01
  • 2011-03-01
  • 2011-02-06
相关资源
最近更新 更多