With kotlin native how do I include a created cinterop library with the final executable. Currently when I try to run the executable generated from my project it is looking for the .so file the corresponds to the library that I used the cinterop tool on, I would rather that this gets built into the final executable so that the end user does not have to install this dependency along with the project. I have already tried to use the staticLibrary option in the .def file
l
Landry Norris
04/26/2023, 10:16 PM
You'll need a static library to do that (.a instead of .so). Shared objects have to be on the linker path at runtime. Static libraries get built into the executable.
k
Kolby Kunz
04/26/2023, 10:17 PM
Okay I see. I am assuming that is a limitation of using the underlying compiler.
Kolby Kunz
04/26/2023, 10:17 PM
Thank you
l
Landry Norris
04/26/2023, 10:18 PM
That's just how ELF works. If you want it to be statically linked, you need libfoo.a