Does a C-library compiled with cinterop tool suppo...
# kotlin-native
k
Does a C-library compiled with cinterop tool support Android app as well or is it just for the iOS app? If so, how would a build.gradle file look like that has a cinterop tag to build a klib file for both the platforms. I am unable to make this klib work for android right now. Any ideas?
a
https://kotlinlang.slack.com/archives/C3SGXARS6/p1560183755112500?thread_ts=1560181354.110600&cid=C3SGXARS6 There are no changes from the last time. Please, keep calm for some time. Also, it looks like you misunderstood the concept of
.klib
produced by
cinterop
. According to (https://kotlinlang.org/docs/reference/native/libraries.html#cinterop-tool-specifics) it makes “wrappers for native libraries”, not ready to deploy libs.
p
We use a thin SWIG generation for our native libraries. Nevertheless this enforces you to provide proper C headers.
n
It is very common for C libraries to provide headers. Headers are needed to create a Shared library.