-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation isssue in jwt.h from picojson include directories #195
Comments
While this was how it worked originally, jwt-cpp has come a long way since then (supporting multiple ssl and json libraries in multiple versions). The supposed way to do this is to configure your include paths in a way that makes picojson visible at that path. It doesn't need to be the version that ships with this repo, you can also use a already present one or system installed one. The fact that As for the include failure. Make sure to configure the include path correctly, or use a package manager or cmakes fetchcontent to include and link the library. Copy pasting the file is a bad idea cause it prevents you from easily getting updates which, given jwt-cpp is usually used in a security sensitive context, is especially problematic. (We never had a security incident and take care when working on crypto code, but you can never be sure). |
The header includes are designed to be used with CMake. If you just download or clone the source, then yes they would be incorrect. If you are using another build tool perhaps adding support here might be an option? Sadly its it's difficult to support everything but we are open to ideas! |
Even jumping way back, it looks like we had the same issue https://github.com/Thalhammer/jwt-cpp/tree/72553b24e42b80ab2b5d36608df988a73e8db18a |
Since #213 has more information and possible solution I am closing this as a duplicate |
jwt.h includes "picojson/picojson.h"...But the picojson directory is one level above where jwt.h file exists....So the inclusion should be as follows:
"../picojson/picojson.h" .... Otherwise there will be an compilation error. If a developer wants to download this lib and uses the header files as it is available in GitHub, I think you must change jwt.h as I mentioned.
Kindly let me know if I am wrong..
The text was updated successfully, but these errors were encountered: