Thomas
05/04/2019, 3:05 PMDominaezzz
05/04/2019, 3:18 PMThomas
05/04/2019, 3:26 PMDominaezzz
05/04/2019, 3:27 PMDominaezzz
05/04/2019, 3:28 PM./configue
and make
to get the static/dynamic libraries.Dominaezzz
05/04/2019, 3:29 PM.a
, .dynlib
or .framework
to run.Thomas
05/06/2019, 12:42 PM./configure
build it for the machine the command is run from? Would the built framework work on iOS as well?
I executed both commands and it gave me a .a
and .dynlib
file. How can I tell cinterop where it can find these files?Dominaezzz
05/06/2019, 12:46 PMDominaezzz
05/06/2019, 12:47 PMlinkerOpts = -L/path/to/files -lcoap
. Assuming the file look like libcoap.a
.Dominaezzz
05/06/2019, 12:48 PMlinkerOpts
via gradle or cinterop. For your use case I recommend going via gradle.Dominaezzz
05/06/2019, 12:49 PMiosArm32() {
/// This bit here
}
I can show you.Thomas
05/06/2019, 1:19 PMval libcoap by main.cinterops.creating {
val path = "src/nativeInterop/cinterop/libcoap"
defFile("$path/libcoap.def")
val headerFiles = arrayOf("libcoap.h", "async.h", "subscribe.h", "coap_dtls.h")
.map { "$path/$it" }
.toTypedArray()
headers = project.files(*headerFiles)
}
Dominaezzz
05/06/2019, 1:26 PMDominaezzz
05/06/2019, 1:26 PMThomas
05/06/2019, 3:55 PMDominaezzz
05/06/2019, 3:57 PMmemScoped
is your friend 🙂.