Thalhammer / jwt-cpp

A header only library for creating and validating json web tokens in c++
https://thalhammer.github.io/jwt-cpp/
MIT License
899 stars 242 forks source link

Windows i am getting below errors and Linux(clang) those are passing without any issues #124

Closed mahilte9 closed 3 years ago

mahilte9 commented 3 years ago
c:\git\gfs\src\vendor\jwt-cpp\base.h(30) : error C2143: syntax error : missing ';' before 'std::array<char,0x040>'
c:\git\gfs\src\vendor\jwt-cpp\base.h(47) : error C2143: syntax error : missing ';' before 'std::array<char,0x040>'
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(320) : error C2440: '<function-style-cast>' : cannot convert from 'std::error_code' to 'jwt::error::rsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(321) : error C2440: '<function-style-cast>' : cannot convert from 'std::error_code' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(323) : error C2440: '<function-style-cast>' : cannot convert from 'std::error_code' to 'jwt::error::signature_verification_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(324) : error C2440: '<function-style-cast>' : cannot convert from 'std::error_code' to 'jwt::error::signature_generation_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(325) : error C2440: '<function-style-cast>' : cannot convert from 'std::error_code' to 'jwt::error::token_verification_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(776) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::rsa_error' to 'jwt::error::rsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(877) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(882) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(886) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(894) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(897) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(902) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(905) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(909) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(912) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(914) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(916) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::ecdsa_error' to 'jwt::error::ecdsa_exception'
        No constructor could take the source type, or constructor overload resolution was ambiguous
c:\git\gfs\src\include\aim\datamodel\../../../vendor/jwt-cpp/jwt.h(1203) : error C2440: '<function-style-cast>' : cannot convert from 'jwt::error::rsa_error' to 'jwt::error::rsa_exception'
prince-chrismc commented 3 years ago

Can you please provide a detailed description of your OS and compiler? And the Version of jwt_cpp you are using

https://github.com/Thalhammer/jwt-cpp/blob/3af81e62e3d90b600b5f4823f15ad7bdf3beb108/include/jwt-cpp/base.h#L30 https://github.com/Thalhammer/jwt-cpp/blob/3af81e62e3d90b600b5f4823f15ad7bdf3beb108/include/jwt-cpp/base.h#L47 https://github.com/Thalhammer/jwt-cpp/blob/3af81e62e3d90b600b5f4823f15ad7bdf3beb108/include/jwt-cpp/jwt.h#L320-L321 https://en.cppreference.com/w/cpp/error/system_error/system_error

Thalhammer commented 3 years ago

@prince-chrismc Maybe we should add some sort of Windows CI to the pipeline ? Never done that, but I'd assume either travis or github can do it and cmake should be able to generate msbuild files. This is the second time we had issues with msvc.

prince-chrismc commented 3 years ago

Agreed. I should have an opening friday/saturday, I try to look at it then 👍

prince-chrismc commented 3 years ago

Does not appear to be a platform problem https://github.com/prince-chrismc/jwt-cpp/actions/runs/516869589

prince-chrismc commented 3 years ago

Closing as stale. Feel free to re-open if you have more information