Xcode:iOSUndefined架构x86_64的符号ld:找不到架构x86_64的符号

Xcode:iOSUndefined架构x86_64的符号ld:找不到架构x86_64的符号,ios,objective-c,clang,xcode8,Ios,Objective C,Clang,Xcode8,我得到了这个错误: Undefined symbols for architecture x86_64: "_hmac_sha1", referenced from: -[OAHMAC_SHA1SignatureProvider signClearText:withSecret:] in OAHMAC_SHA1SignatureProvider.o "_Base64EncodeData", referenced from: -[OAHMAC_SHA1Signatu

我得到了这个错误:

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);
我不知道是什么问题,也不知道如何解决这个问题


非常感谢您的帮助。

看起来您缺少一个库或框架。在项目导航器中选择项目,转到“常规”选项卡,然后向下滚动到链接的框架和库。单击
+
符号将框架或库添加到项目中


hmac_sha1是通用加密库的一部分,因此这看起来是一个很好的起点

根据我个人的经验,这些铿锵的错误有点普遍。我经常在遇到命名冲突时看到这些。最近,我将一个框架更新到了它的新版本,最终得到了类名冲突和外部NSString*const,这可能是您上面所说的问题。我会在你的代码库中搜索“hmac_sha1”,看看会出现什么。甚至可能更改名称并再次运行。

抱怨的是“\u-hmac\u-sha1”,引用自“is this part”extern void hmac\u-sha1(const u-u-int 8\t-int-text,size-int-text,u-int 8\t-inKey,const-size\t-inKeyLength,u-int 8\t*outDigest);"