I am trying to create, validate, and get data from a jwt token using C++. The library I choose is jwt-cpp because I found it easy to use and it supports almost every algorithm.
For the setup, I followed this answer.
Additionally, there is another path for using jwt-cpp library.
Configure the linker: Setting installed openssl lib folder to linker->general
Setting libcrypto and libssl lib to linker->input
After that, while following the basic tutorial in the jwt-cpp link, I can read all claims and header from the token.
But, when I try to execute token verification or creation (as code provided in the link), I get LNK2019
Error LNK2019 unresolved external symbol _HMAC referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall jwt::algorithm::hmacsha::sign(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::error_code &)const " (?sign@hmacsha@algorithm@jwt@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV45@AAVerror_code@5@@Z)
and
>Error LNK2019 unresolved external symbol _HMAC referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall jwt::algorithm::hmacsha::sign(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::error_code &)const " (?sign@hmacsha@algorithm@jwt@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV45@AAVerror_code@5@@Z)
I can guess that the issue can be in linker setup. I also found a lot of versions of libcrypto and libssl like libcrypto64MD, libcrypto64MDd libcrypto64MT, libcrypto64MTd, libssl64MD, libssl64MDd libssl64MT, libssl64MTd.
Can anybody tell me what can be the issue here?