Wyatt Kennedy
02/24/2022, 9:56 PMmingwX64 {
this.compilations["main"].cinterops {
create("test") {
packageName = "github.fatalcatharsis.test"
includeDirs.allHeaders(project.rootDir.resolve("headers"))
extraOpts("-libraryPath", "${project.rootDir}/src/mingwX64Main/resources/", "-staticLibrary", "test.a")
}
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation(kotlin("stdlib-common"))
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
val nativeMain by creating {
dependsOn(commonMain)
}
val mingwX64Main by getting {
dependsOn(nativeMain)
}
}
Code that I put in src/mingwX64Main/kotlin gets highlighted properly and builds using the definitions in my c header. But nativeMain obviously does not. Is there any way to have the header bindings available to a shared source set?msink
02/25/2022, 2:03 AMgradle.properties
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.enableHierarchicalCommonization=true
Wyatt Kennedy
02/25/2022, 2:54 AMWyatt Kennedy
02/25/2022, 3:09 AMWyatt Kennedy
02/25/2022, 3:11 AMmsink
02/25/2022, 3:15 AMWyatt Kennedy
02/25/2022, 3:17 AMWyatt Kennedy
02/25/2022, 4:02 AM