header

open fun header(file: Any)

Adds a header file to produce Kotlin bindings. It's equivalent to the -header cinterop tool option.

Usage example

kotlin {
linuxX64() {
compilations.getByName("main") {
cinterops {
val cinterop by creating {
defFile(project.file("custom. def"))
header(project.file("custom.h"))
}
}
}
}
}

Parameters

file

The header file to be included for interoperability with C.