-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Use as shared library #2
Comments
Hm, its only dependency is MbedTLS, which is being maintained by ARM themselves. But yeah, I know that linking libraries in C ain't always fun... Cheers |
I did manager to make the library a shared library. At least the MbedTLs dependencies. The l8w8jwt is still static. This was all done with Cmake |
Thanks for the info! I'll look into it as soon as I have the time. Sounds strange, it should build shared libs with that option..
Correct. The only significant (in terms of heaviness) dependency is MbedTLS. The other 3 you can check out inside the |
I got the first part working to build the shared libraries and install them with the following method:
And then add -ll8w8jwt to you gcc build command. But i'm currently a bit stuck on, how to #include l8w8jwt/decode.h |
Did you include the l8w8jwt include directory via GCC's |
to add the library i did
The include is for in my source code header file |
try adding |
if i add that piece to the gcc builder. It is missing the other parts Currently trying to move and fix the header files linking |
ah, true! Those are needed as well. Add |
I made it easier, by coping the header files to the same file . So you don't get to many -I links in the build command
When i build that piece i get no error and i get the proper output from the example piece of code |
I understand :) I'll close this issue then, and wish you good luck with your project! |
Maybe an idea, to add these steps to your guide. So other people can also use it for there projects in this way |
The intended usage is definitively with a build system (CMake in this case). It's so much more pleasant! But if you're okay with it, I could add a small GCC section inside the README.md that links to our conversation in this issue? |
I understand that is the use case for the project. But it's a little extra for the people who do it with gcc. And gives an extra option for your library to be used :) I'm oke with linking to this conversation |
Added GCC instructions to README.md (by linking to issue #2 ). Special thanks to @Calmly145
It there a possibility to make the library as an shared library for a unix arm based system?
I'm trying to use it on raspbian, but i cannot get the linking of the libraries right.
The text was updated successfully, but these errors were encountered: