集成QQ互联SDK或者友盟社会化分享SDK出现Undefined symbols for architecture i386的分析
文档更新说明
- 最后更新 2016年07月12日
- 首次更新 2016年07月12日
正文
集成友盟社交化分享组件并且在模拟器(iphone5)上编译时报错了,提示:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_QQApiAudioObject", referenced from:
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_QQApiImageObject", referenced from:
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_QQApiInterface", referenced from:
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_QQApiNewsObject", referenced from:
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_QQApiTextObject", referenced from:
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_QQApiVideoObject", referenced from:
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_SendMessageToQQReq", referenced from:
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_TencentOAuth", referenced from:
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
关于这个问题其实还是很好理解的,原因就是QQ互联的SDK在目前的最新版里已经没有再支持i386指令集了,不过呢还是支持x86_64指令集,所以简单一句话就是,这个SDK不能在iphone5及以下的模拟器跑了,但是支持64位模拟器比如iphone5s及以上.看到友盟论坛好多同学不清楚,索性写下这篇短文分析一下了.
顺便附带一个QQ官方的SDK更新说明吧.