I am new to Kotlin/Native as I assume many others are and wish to use a C library from Kotlin. There is documentation out there and a couple tutotials that get you 85% and just miss the mark. And YES, I tried to read about everything before I asked the question.
The flow to utilize a C library in Kotlin is easy to find.
1) create a .def file ---Ok!
2) use the tool cinterop on the .def file to create a .klib file -- OK
----NOW HOW DO YOU USE IT??---
Specifically, now that we have a .klib file, call it "XXX.klib", how do we import the symbols?
Is one supposed to use gradle and add a dependency of the klib file? Is there a default folder structure to put the .Klib in? Is one supposed to some how associate the Klib with a package?
The issue I am having with gradle at the time is I really don't understand what is relevant to the thing I am doing vs what you find on the internet. Somebody just saying..."Here's my gradle file" really hurts more than than it helps some times because it does not make you smarter just copying it.
I have looked at the link https://medium.com/androidiots/the-magic-of-kotlin-native-part-2-49097c2dea1a
I have also looked at a very near answer to my question Adding a `.klib` library to kotlin multiplatform
But the answers fell short.