Crypto ++库通过编译cryptlib.lib
和cryptopp.lib
来支持后期绑定。这需要使用cryptopp.dll
。当试图延迟加载这个dll /DELAYLOAD:cryptopp.dll
这会导致一个链接错误,它不能延迟加载,因为所需的导入。延迟加载crypto ++ cryptopp.dll
作为示例,请参见下面的代码:
#include <Crypto++/dll.h>
#include <crypto++/base64.h>
bool HexDecode(const std::string& strHex, std::string& strData)
{
try
{
CryptoPP::StringSource(strHex, true,
new CryptoPP::Base64Decoder(
new CryptoPP::StringSink(strData)));
}
catch(...)
{
return false;
}
return true;
}
这会导致下面的链接错误:
LINK : fatal error LNK1194: Delay loading "cryptopp.dll" not possible because of import of data symbol ""__declspec(dllimport) bool (__cdecl* CryptoPP::g_pAssignIntToInteger)(class type_info const &,void *,void const *)" ([email protected]@@[email protected]@[email protected])". Link without /DELAYLOAD:cryptopp.dll
有没有人已经成功地延迟加载cryptopp.dll
成功?