微信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;

上一篇:[JavaScript]'this'详解


下一篇:大数据之-Hadoop3.x_Yarn_生产环境多队列创建&好处---大数据之hadoop3.x工作笔记0151