Nathan Bedell
04/23/2024, 3:01 PM@CName
annotation, that endpoint only gets exposed in the h file for the project itself.
What I mean by this is if I have some Kotlin native library Foo that has some @CName
declarations, and I have a Kotlin native project Bar that depends on Foo, ideally in the final built dll / so file I want to be able to still access the endpoints declares in Foo with @CName
.
However, what seems to happen right now is that only the @CName
declarations in Bar actually get exported as an external C function, and essentially if I want to have the ones from Foo available as well, I need to re-export them.
This isn't great for re-usability, so I was wondering if anyone has found a good workaround for this, or if this problem is known and being worked?
I've tried using both my final dll and the library dll in my final application, but that seems to cause other issues. I'm guessing because Bar is statically linked with Foo. So one thought I had was: Is it possible to get the Kotlin native compiler to dynamically link some Kotlin native library dependencies?