美文网首页
微信分享SDK导入报错之Undefined symbols fo

微信分享SDK导入报错之Undefined symbols fo

作者: Kity_Pei | 来源:发表于2018-07-10 10:54 被阅读0次

报错如下:

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)
  "___cxa_begin_catch", referenced from:
      ___clang_call_terminate in libWeChatSDK.a(WechatAuthSDK.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)
  "std::terminate()", referenced from:
      ___clang_call_terminate in libWeChatSDK.a(WechatAuthSDK.o)
  "___gxx_personality_v0", referenced from:
      -[NSDictionary(NSDictionary_SafeJSON) wxApi_stringForKey:] in libWeChatSDK.a(WechatAuthSDK.o)
      -[NSDictionary(NSDictionary_SafeJSON) wxApi_arrayForKey:] in libWeChatSDK.a(WechatAuthSDK.o)
      -[NSDictionary(NSDictionary_SafeJSON) wxApi_dictionaryForKey:] in libWeChatSDK.a(WechatAuthSDK.o)
      -[NSDictionary(NSDictionary_SafeJSON) wxApi_integerForKey:] in libWeChatSDK.a(WechatAuthSDK.o)
      -[NSDictionary(NSDictionary_SafeJSON) wxApi_floatForKey:] in libWeChatSDK.a(WechatAuthSDK.o)
      -[NSDictionary(NSDictionary_SafeJSON) wxApi_doubleForKey:] in libWeChatSDK.a(WechatAuthSDK.o)
      -[WechatAuthSDK init] in libWeChatSDK.a(WechatAuthSDK.o)
      ...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

错误原因

缺少libc++库,添加libc++库即可解决。

相关文章

网友评论

      本文标题:微信分享SDK导入报错之Undefined symbols fo

      本文链接:https://www.haomeiwen.com/subject/trlfpftx.html