I'm not able to generate Kotlin bindings for C hea...
# kotlin-native
a
I'm not able to generate Kotlin bindings for C headers on WSL using the gradlew, the task runs and in under 3 seconds build gets successful and no bindings are getting generated. Anybody encountered the issue, and any solutions?
a
Hello, @Animesh Sahu! If I got you correctly, there are no
*-cinterop.klib
files being generated at the
build/classes/kotlin/native/
, correct? If so, you can do the following. Please run gradle with
--info
flag to get list of arguments the
cinterop
tool being called with. Then you’ll be able to run it manually and look at generated files.
a
@Artyom Degtyarev [JB] Thanks for the reply, I didn't checked that earlier. Actually local c-code under the .def file (after 3 ---) are generated, but not the one with the x11 (which is in another def file linked on to gradle in the same manner as the first one). Maybe an issue with finding the files of X11 (but seems path is correct, what else could it be)?
message has been deleted
a
So, you have two separate cinterop blocks defined in build.gradle.kts? This one, and one for X11. IIRC calling task named cinterop<BlockName><TargetName> should not trigger any dependencies to also produce bindings. Check the list of available tasks, maybe this is just a wrong one.
a
Ohh, a single CInteropSetting can only have one def file, if given other it overrides the first 😅😅, That wasn't the case for
header()
function... It adds header if given twice.. I was confused, about that. Thanks for the help 🙂
👍 1
a
I think it might be added to the documentation 😄
☝️ 1
😃 1