美文网首页
集成qq登陆报错:Undefined symbols for a

集成qq登陆报错:Undefined symbols for a

作者: 大象豆豆 | 来源:发表于2016-08-03 16:13 被阅读38次

按照腾讯文档步骤完成,只要遵守<TencentSessionDelegate> 协议,就会报警告:

Cannot find protocol definition for 'TencentsessionDelegate'
  • 警告说这个协议没有定义,是因为这个协议虽然定义了,但是这个协议也可能遵守其他协议,如果这个父协议没有定义,也会报这种警告.

编译之后还会报错:
(在以前是不会报下面错误,只会有上面警告,还能正常运行)

Undefined symbols for architecture x86_64:
  "l_OBJC_PROTOCOL_$_TencentApiInterfaceDelegate", referenced from:
      l_OBJC_$_PROTOCOL_REFS_TencentSessionDelegate in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决办法:
经过查找,TencentSessionDelegate协议遵守了"TencentApiInterface.h"中的TencentApiInterfaceDelegate协议,所以在"TencentOAuth.h"中,添加#import "TencentApiInterface.h" 就解决了.

PS:感觉腾讯的文档老的不行不行的,问腾讯客服也不理,这个问题找了好久才解决.

相关文章

网友评论

      本文标题:集成qq登陆报错:Undefined symbols for a

      本文链接:https://www.haomeiwen.com/subject/jmwqsttx.html