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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了微信SDK导入报错 Undefined symbols for architecture i386:"operator delete[](void*)", referenced f相关的知识,希望对你有一定的参考价值。

异常信息:

  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;

以上是关于微信SDK导入报错 Undefined symbols for architecture i386:"operator delete[](void*)", referenced f的主要内容,如果未能解决你的问题,请参考以下文章

uniapp转微信小程序报错Cannot read property ‘forceUpdate‘ of undefined - 微信开发者工具报错

微信小程序报错解决方法TypeError: Cannot read property ‘setData‘ of undefined

解决报错Cannot read property 'forceUpdate' of undefined

环信webuniapp微信小程序sdk报错详解---注册篇

环信webuniapp微信小程序sdk报错详解---注册篇

vue-cli4创建项目导入elementUI,浏览器报错Uncaught TypeError: Cannot read property ‘prototype‘ of undefined