Closed Clinkz24 closed 6 years ago
I'm having the same problem. Trying to compile under Visual Studio 2017.
Hi @acceleratxr and @Clinkz24 Thanks for reporting the issue. Making it compile for VS sucks. I have put in few fixes. Can you please check and let me know if you are getting more errors ? Unfortunately that is the only way I will be able to fix windows errors.
Thanks
Any updates guys ? @acceleratxr @Clinkz24
I was able to solve it a different way. I added the following to jwt/algorithm.hpp
#if defined(_WIN32) || defined(_WIN64)
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#endif
It now compiles but when I generate a token they all have invalid signatures.
@acceleratxr Thanks for the update. Are the tests also failing with the latest pull ?
This still does not work for me. strcasecmp
is not a standard library function. It resulted in build failures in our project: https://ci.appveyor.com/project/bunnei/citra/builds/19841580/job/68b49cbmyiwsnl0a/messages
I hope this get fixed soon. For now I guess I'll have to use the #define
workaround
edit: disregard, I used an old commit
@zhaowenlan1779 Do you think I can close this issue as it is working for you ? All the tests work with VS ?
Please reopen if still an issue.
d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\string_view.hpp(352): warning C4003: not enough actual parameters for macro 'max' 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\string_view.hpp(353): warning C4003: not enough actual parameters for macro 'max' 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\string_view.hpp(354): warning C4003: not enough actual parameters for macro 'min' 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\string_view.hpp(355): warning C4003: not enough actual parameters for macro 'min' 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\base64.hpp(64): error C3249: illegal statement or sub-expression for 'constexpr' function 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\base64.hpp(158): error C3249: illegal statement or sub-expression for 'constexpr' function 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(223): error C3431: 'algorithm': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(248): error C3431: 'algorithm': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(252): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(253): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(254): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(255): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(256): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(257): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(258): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(259): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(260): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\algorithm.hpp(261): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(62): error C3431: 'type': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(66): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(67): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(69): warning C4297: 'jwt::str_to_type': function assumed not to throw an exception but does 1> d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(69): note: __declspec(nothrow), throw(), noexcept(true), or noexcept was specified on the function 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(79): error C3431: 'type': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(116): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(300): error C3431: 'algorithm': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(300): error C3431: 'type': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(330): error C3431: 'algorithm': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(348): error C3431: 'algorithm': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(360): error C3431: 'type': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(378): error C3431: 'type': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(493): error C3431: 'algorithm': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(496): error C3431: 'type': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(422): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(444): error C3861: 'strcasecmp': identifier not found 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(606): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(620): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(635): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(668): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(692): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(716): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(741): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(1018): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(1035): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\jwt.hpp(1057): error C3431: 'registered_claims': a scoped enumeration cannot be redeclared as an unscoped enumeration 1>d:\workspace\trd\curl-7.61.0\projects\windows\vc14\curl_test\jwt\impl\jwt.ipp(91): error C3861: 'strcasecmp': identifier not found