【问题标题】:MailCore Errors IOSMailCore 错误 IOS
【发布时间】:2012-02-27 18:47:54
【问题描述】:

我尝试在我的项目中使用 MailCore,但出现以下错误:

Undefined symbols for architecture armv7:
  "_MailCoreEnableLogging", referenced from:
      -[ImapSync run] in ImapSync.o
  "_OBJC_CLASS_$_CTCoreMessage", referenced from:
      l_OBJC_$_CATEGORY_CTCoreMessage_$_CTCoreMessageBuisnessMail in CTCoreMessage+BuisnessMail.o
  "_OBJC_IVAR_$_CTCoreMessage.myFields", referenced from:
      -[CTCoreMessage(CTCoreMessageBuisnessMail) libetpanDateTime] in CTCoreMessage+BuisnessMail.o
      -[CTCoreMessage(CTCoreMessageBuisnessMail) senderDate] in CTCoreMessage+BuisnessMail.o
  "_OBJC_CLASS_$_CTCoreAccount", referenced from:
      objc-class-ref in AttachmentDownloader.o
      objc-class-ref in ImapSync.o
  "_MailCoreDisableLogging", referenced from:
      -[ImapSync run] in ImapSync.o
  "_IfTrue_RaiseException", referenced from:
      -[ImapFolderWorker fetchFrom:to:seqDelta:syncingNew:progressOffset:progressTotal:alreadySynced:] in ImapFolderWorker.o
ld: symbol(s) not found for architecture armv7

但是所有这些方法都在那里,我可以在 MailCoreProject 中看到它们!

希望有人能帮帮我!

【问题讨论】:

    标签: objective-c ios xcode4 mailcore


    【解决方案1】:

    首先,我会检查您是否已将 libMailCore-ios.a 添加到“链接框架和库”列表中。

    如果是这样,那么问题可能是 MailCore 项目是为一台设备编译的,而您的主项目是为另一台设备编译的。例如,

    • MailCore 项目是为模拟器编译的...MailCore 的符号是为 x86 架构生成的
    • 您的主项目是为真正的 iOS 设备编译的...所以链接器正在寻找 armv7 架构的 MailCore 符号
    • 因此,链接器抱怨,未找到 armv7 架构的符号

    要解决此问题,请使用与主项目相同的设备(或相同的模拟器)重新构建 MailCore 子项目(build-clean 和 build)。

    【讨论】:

      【解决方案2】:

      这些可能是很多东西。您如何将 MailCore 添加到您的项目中?作为静态库?

      您缺少 armv7 架构的编译文件。确保它已添加到 MailCore 项目的“构建设置”中,然后尝试构建它。 您可能为模拟器构建了 MailCore,现在您正尝试在设备上运行它。这些必须分开。

      此外,您必须确保 MailCore 正在使用的所有库(例如 libetpan)都已正确编译。

      PS:将 MailCore 添加到您的项目不是一个简单的过程,但它是值得的。 :)

      【讨论】:

        猜你喜欢
        • 2016-06-18
        • 2013-09-16
        • 2017-02-05
        • 2013-10-08
        • 2012-10-03
        • 2012-08-05
        • 2016-06-22
        • 2015-08-24
        • 2013-01-18
        相关资源
        最近更新 更多