pokowaka/jwt-cpp

vs2015 link error

Closed this issue · 2 comments

First, jwtd.lib Compiled successfully. But when i test in my project , it reports link errors,As shown below

error LNK2019: unresolved external symbol _EVP_sha256 referenced in function "public: __thiscall HS256Validator::HS256Validator(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (??0HS256Validator@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z)
1>jwtd.lib(hmacvalidator.obj) : error LNK2019: unresolved external symbol _EVP_MD_size referenced in function "public: __thiscall HMACValidator::HMACValidator(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,struct evp_md_st const *,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (??0HMACValidator@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@PBUevp_md_st@@0@Z)
1>jwtd.lib(hmacvalidator.obj) : error LNK2019: unresolved external symbol _HMAC_CTX_new referenced in function "public: __thiscall HMacCtx::HMacCtx(void)" (??0HMacCtx@@QAE@XZ)
1>jwtd.lib(hmacvalidator.obj) : error LNK2019: unresolved external symbol _HMAC_CTX_free referenced in function "public: __thiscall HMacCtx::~HMacCtx(void)" (??1HMacCtx@@QAE@XZ)
1>jwtd.lib(hmacvalidator.obj) : error LNK2019: unresolved external symbol _HMAC_Init_ex referenced in function "public: virtual bool __thiscall HMACValidator::Sign(unsigned char const *,unsigned int,unsigned char *,unsigned int *)const " (?Sign@HMACValidator@@UBE_NPBEIPAEPAI@Z)
1>jwtd.lib(hmacvalidator.obj) : error LNK2019: unresolved external symbol _HMAC_Update referenced in function "public: virtual bool __thiscall HMACValidator::Sign(unsigned char const *,unsigned int,unsigned char *,unsigned int *)const " (?Sign@HMACValidator@@UBE_NPBEIPAEPAI@Z)
1>jwtd.lib(hmacvalidator.obj) : error LNK2019: unresolved external symbol _HMAC_Final referenced in function "public: virtual bool __thiscall HMACValidator::Sign(unsigned char const *,unsigned int,unsigned char *,unsigned int *)const " (?Sign@HMACValidator@@UBE_NPBEIPAEPAI@Z)
1>........\build\Win32\VC14\DLL Debug\curl_test.exe : fatal error LNK1120: 7 unresolved externals

resolve。。my bad

How did you fix it?