3

I'm trying to get weChat SDK working with my app. I followed the link below to download the arm64 file but had no luck. I still get the following 3 errors:

WeChat SDK on arm64

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)

Please help...

Community
  • 1
  • 1
Ibdakine
  • 504
  • 4
  • 17
  • It's very simple: if you are experiencing this error. You first need the arm64 library mentioned in the link above. the KEY TO MAKING THIS COMPILE IS THE FOLLOWING: you must add the libc++.dylib library to your project. This is not mentioned in ANY OTHER LINK! enjoy =) – Ibdakine Apr 24 '15 at 05:17
  • [Here is a guide](http://stackoverflow.com/a/35862318/3681880) written for Swift but is also useful for Objective C. – Suragch Mar 08 '16 at 09:23

1 Answers1

14

THE KEY TO MAKING THIS COMPILE IS THE FOLLOWING: you must add the libc++.dylib library to your project. This is not mentioned in ANY OTHER LINK! I spent probably 30 miserable hours looking for this answer. I hope you find this post in less than 1. enjoy.

Ibdakine
  • 504
  • 4
  • 17