我正在链接第三方库(Poco C++)并从链接器中获取以下未解决的符号错误。它似乎无法找到“CryptAcquireContextW”、“CryptReleaseContext”和“CryptGenRandom”。
根据此处的 Microsoft 信息,这些函数可使用“Advapi32.lib”链接。我已将其添加到我的链接器输入中,但符号仍未解析。
1>PocoFoundationCLR.lib(RandomStream.obj) : error LNK2019: unresolved external symbol __imp__CryptAcquireContextW@20 referenced in function "public: virtual int __thiscall Poco::RandomBuf::readFromDevice(char *,__int64)" (?readFromDevice@RandomBuf@Poco@@UAEHPAD_J@Z)
1>PocoFoundationCLR.lib(RandomStream.obj) : error LNK2019: unresolved external symbol __imp__CryptReleaseContext@8 referenced in function "public: virtual int __thiscall Poco::RandomBuf::readFromDevice(char *,__int64)" (?readFromDevice@RandomBuf@Poco@@UAEHPAD_J@Z)
1>PocoFoundationCLR.lib(RandomStream.obj) : error LNK2019: unresolved external symbol __imp__CryptGenRandom@12 referenced in function "public: virtual int __thiscall Poco::RandomBuf::readFromDevice(char *,__int64)" (?readFromDevice@RandomBuf@Poco@@UAEHPAD_J@Z)
我已经验证了 Advapi32.lib 在搜索路径中,而 Advapi32.dll 在 Windows 目录中,所以我不确定这个错误是如何继续发生的。
想法,有人吗?
谢谢!