简体   繁体   English

无法访问任何其他类中的MailCore类

[英]Failed to access the MailCore Classes in any other classes

I have added the MailCore.xcodeproj in my application, and set the Header Search Path, Library Search Path and Framework Search Path like as it is set in Remail application. 我已经在应用程序中添加了MailCore.xcodeproj,并像在Remail应用程序中一样设置了标题搜索路径,库搜索路径和框架搜索路径。 But when I am accessing the classes of the MailCore (like CTCoreAccount, CTCoreFolder, etc) after import in any other class and creating an object like this: 但是当我在导入任何其他类并创建像这样的对象之后访问MailCore的类(例如CTCoreAccount,CTCoreFolder等)时:

#import "CTCoreAccount.h"
CTCoreAccount* account = [[CTCoreAccount alloc] init];

I will get the following error: 我将收到以下错误:

Undefined symbols for architecture i386: 体系结构i386的未定义符号:
"_OBJC_CLASS_$_CTCoreAccount", referenced from: objc-class-ref in ImapSync.o ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status “ _OBJC_CLASS _ $ _ CTCoreAccount”,引用自:ImapSync.o中的objc-class-ref ld:对于体系结构i386 collect2未找到符号:ld返回1退出状态

How can I resolve this error? 如何解决此错误?

I think your import statement is wrong. 我认为您的进口声明有误。

You should be using a relative header - and just use the top level one for the framework: 您应该使用相对头文件-只需在框架上使用顶层头文件即可:

#import <MailCore/MailCore.h>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM