martmists
07/04/2021, 4:10 PMunsigned long
is a ULong, but on windows it's parsed as UInt
russhwolf
07/04/2021, 4:43 PMunsigned long
on those platforms in particular but it is common for k/n platforms with different integer widths to map numerical types differentlymartmists
07/04/2021, 4:52 PMrusshwolf
07/04/2021, 5:00 PMconvert()
function which can help but if you're not careful you can lose information because it's just a shorthand for calling toInt()
or toLong()
as needed.martmists
07/04/2021, 5:08 PMexpect
and actual
russhwolf
07/04/2021, 5:13 PMimport kotlinx.cinterop.convert
https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.cinterop/convert.htmlrusshwolf
07/04/2021, 5:14 PMmartmists
07/04/2021, 5:17 PMrusshwolf
07/04/2021, 5:27 PMmartmists
07/04/2021, 5:40 PMkotlin
sourceSets {
val nativeMain by getting {
kotlin.apply {
exclude("**/platform/*.kt")
when {
hostOs == "Mac OS X" -> include("**/platform/macos.kt")
hostOs == "Linux" -> include("**/platform/linux.kt")
isMingwX64 -> include("**/platform/windows.kt")
}
}
}
}
but it didn't seem to work
gradle runReleaseExecutableNative
also doesn't do anything, yet doesn't compile with any errors even though there should be according to the IDE