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

Build as a static lib #80

Closed
livneros opened this issue Dec 18, 2022 · 2 comments
Closed

Build as a static lib #80

livneros opened this issue Dec 18, 2022 · 2 comments

Comments

@livneros
Copy link

Hey,
Is it possible to enable building the library as a static library, rather than a shared one?
Thanks.

@livneros
Copy link
Author

livneros commented Dec 18, 2022

replace:
ADD_LIBRARY(JetsonGPIO SHARED ${JetsonGPIO_LIB_SRCS})
with:
ADD_LIBRARY(JetsonGPIO STATIC ${JetsonGPIO_LIB_SRCS})

@KTBM
Copy link

KTBM commented Dec 17, 2023

hello, i am trying to add this library to my project but i can't build a cmake file that's able to make it static.
and i don't understand where to add the line that you've typed and if its a standalone line, because even if I add it, I still receive an error: attempted static link of dynamic object `/usr/local/lib/libJetsonGPIO.so.1.2.4'

can you please add a CMakeLists.txt file example to make JetsonGPIO a static library.

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

No branches or pull requests

2 participants