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

时间:2016-01-27 17:24:52   收藏:0   阅读:580

异常信息:

  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中,增加以下依赖:

技术分享

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

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

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!