您的位置:首页 > 其它

Undefined symbols for architecture i386:的解决方案

2012-11-22 15:02 337 查看


对于错误信息Undefined symbols for architecture i386:的解决方案

其他代码

当拷贝文件到工程里的时候,若不注意勾选"Add to Target",运行时会报如下类似的错误:
Undefined symbols for architecture i386:

"_OBJC_CLASS_$_SKPSMTPMessage", referenced from:
objc-class-ref in ConfirmController.o

"_kSKPSMTPPartContentTransferEncodingKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController.o

"_kSKPSMTPPartMessageKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController.o

"_kSKPSMTPPartContentTypeKey", referenced from:
-[ConfirmController sendEmail] in ConfirmController.o

ld: symbol(s) not found for architecture i386

解决方法:
先点击方案(左边列表,点击方案的图示)
选择target
选择页签Build Phases
Compile Source
如果没展开的话先展开
向下找加号,点击加号,将这个target需要的.m档案的头文件都加入吧
(如果只有一个 就把左右的.h档案都加入)
这样就应该可以了


描述:类似Undefined symbols for architecture i386: "_OBJC_CLASS_$_SKPSMTPMessage", referenced from: objc-class-ref in ConfirmController.o "_kSKPSMTPPartContentTransferEncodingKey", referenced from: -[ConfirmController sendEmail] in ConfirmController.o
"_kSKPSMTPPartMessageKey", referenced from: -[ConfirmController sendEmail] in ConfirmController.o "_kSKPSMTPPartContentTypeKey", referenced from: -[ConfirmController sendEmail] in ConfirmController.o ld: symbol(s) not found for architecture i386的错误
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐