Xcode Version 6.2 (6C131e)
导入方式,手动在工程同级目录下新建一个文件,拷贝libWeChatSDK.a,WxApi.h,WxApiObject.h三个文件到此目录下,再使用添加文件到工程。编译的时候报如下错误:
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)
在网上找过不少同样错误的问题解释,都没能解决,有个简单的方式是把我的代码拷贝到Wx的示例代码中去解决,但这样还是没有真正的找到原因,因此想问一下有没有人解决过这类问题。