微信SDK导入报错 Undefined symbols for architecture i386:"operator delete[](void*)", referenced from:

异常信息:

  1. Undefined symbols for architecture i386:
  2.  "operator delete[](void*)", referenced from:
  3.      +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  4.      +[WeChatApiUtil NsDataEncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  5.      +[WeChatApiUtil DecodeWithBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  6.      +[WeChatApiUtil DecodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  7.  "operator new[](unsigned long)", referenced from:
  8.      +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  9.      +[WeChatApiUtil NsDataEncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  10.      +[WeChatApiUtil DecodeWithBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  11.      +[WeChatApiUtil DecodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  12. ld: symbol(s) not found for architecture i386
  13. clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决办法:在Build Phases选项卡的Link Binary With Libraries中,增加以下依赖:

微信SDK导入报错 Undefined symbols for architecture i386:"operator delete[](void*)", referenced from:

注意:如果是Xcode 7.0之后的版本,需要添加libc++.tdb,libz.tdb;    

        如果是Xcode 7.0之前的版本,需要添加libc++.dylib,libz.dylib;

微信SDK导入报错 Undefined symbols for architecture i386:"operator delete[](void*)", referenced from:

上一篇:云通信产品专家翅飞:企业如何提升用户全生命周期管理效率?号码百科来帮忙


下一篇:夺命雷公狗---微信开发10----玩转多图文消息回复