微信支付接入报错 +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)

1、报错内容

微信支付接入报错 +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)

Undefined symbols for architecture arm64:
  "operator new[](unsigned long)", referenced from:
      +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil NsDataEncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil DecodeWithBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil DecodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  "operator delete[](void*)", referenced from:
      +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil NsDataEncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil DecodeWithBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil DecodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

2、解决办法

  • 导入libc.tbd
    微信支付接入报错 +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)

微信支付接入报错 +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)

上一篇:发送广播重新挂载SD卡,使图库可以及时显示自己保存的图片(无需手机重启)


下一篇:微信小程序的生命周期和路由