我收到此错误:
Undefined symbols for architecture x86_64:
"_hmac_sha1", referenced from:
-[OAHMAC_SHA1SignatureProvider signClearText:withSecret:] in OAHMAC_SHA1SignatureProvider.o
"_Base64EncodeData", referenced from:
-[OAHMAC_SHA1SignatureProvider signClearText:withSecret:] in OAHMAC_SHA1SignatureProvider.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
这条线正在抱怨:
extern void hmac_sha1(const u_int8_t *inText, size_t inTextLength, u_int8_t* inKey, const size_t inKeyLength, u_int8_t *outDigest);
我无法弄清楚出了什么问题,或者我该如何解决这个问题。
我非常感谢你的帮助。
答案 0 :(得分:0)
看起来你错过了一个库或框架。在项目导航器中选择项目,转到“常规”选项卡,然后向下滚动到“链接的框架和库”。单击+
符号将框架或库添加到项目中。
hmac_sha1是Common Crypto库的一部分,因此它看起来像是一个很好的起点。
答案 1 :(得分:0)
从我个人的经验来看,这些铿锵的错误有点笼统。我经常在命名碰撞时看到这些。最近我更新了一个框架到它的新版本,最终得到了一个类名碰撞和一个extern NSString * const,从你上面说的可能是你的问题。我正在搜索" hmac_sha1"在你的代码库中,看看会出现什么。甚至可能更改名称并再次运行它。