Skip to content
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

x86/Win32 compilation and using boost json #309

Closed
johandanforth opened this issue Sep 6, 2023 · 2 comments
Closed

x86/Win32 compilation and using boost json #309

johandanforth opened this issue Sep 6, 2023 · 2 comments

Comments

@johandanforth
Copy link

johandanforth commented Sep 6, 2023

What's your question?

How to compile jwt-cpp in an existing win32 c++ library, using boost json?

Additional Context

My c++ skills are really lousy, but I need to integrate jwt-cpp into an existing win32 library, preferably using boost json if possible. Can someone please help me into the right direction. I'm using Visual Studio 2022 and get weird compiler errors regarding openssl, like this:

1>C:\asd\Downloads\openssl-3.1.2\openssl-3.1.2\include\openssl\opensslconf.h(14,11): fatal  error C1083: Cannot open include file: 'openssl/configuration.h': No such file or directory

I downloaded the latest openssl code, and there is only a configuration.h.in file. Tried to rename it, but I get a million other errors after that.

Sorry about the noob question, but I've spent days on trying to verify jwt tokens in a win32 c++ library... In c# I did it in 5 minutes :/

@Thalhammer
Copy link
Owner

From what I can tell just looking at your description and the error message, it seems like you didn't install openssl correctly (only copied the source files and not building it).
Unlike jwt-cpp, which is a header only library and can just be dropped into the project, you need to build openssl, during which the configuration.h.in file should get filled with information about your build and renamed to configuration.h.

Assuming you use visual studio for development the easiest way to get everything working would be to use the nuget package for both jwt-cpp and openssl.
If you don't use visual studio or don't want to use nuget, you can install a prebuilt version of it like this.

@prince-chrismc
Copy link
Collaborator

As this is a problem with installing dependencies, I am going to close this.

As Thalhammer mentioned, you should really look into using a package manager, given you need at least three it makes it a ton easier, Nuget, VCPKG, and Conan are great options to look into :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants