我有一个.m文件,其中包含一些常量,我试图将其包含在podspec的源文件中:
s.source_files = 'GBToolbox/GBConstants_Common.{h,m}',
...
但是在构建应用程序时,出现未找到符号错误:
Undefined symbols for architecture i386:
"_kSomeConst", referenced from:
_DataForObject in APIProxy.o
...
源文件的外观为标头:
//GBConstants_Common.m
extern NSUInteger const kSomeConstant;
执行:
//GBConstants_Common.m
#import "GBConstants_Common.h"
NSUInteger const kSomeConstant = 42;
任何想法可能是什么原因造成的?
一个星期前我也遇到了同样的问题。您的Pods项目未编译所有必需的体系结构。看你的留言
Undefined symbols for architecture i386:
为了纠正这一点:
在Pods项目中必须设置相同的值
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句