Aregev2
07/24/2018, 1:33 PMtime.h
header and the cinterop tool throws an exception, can someone help?
time.def
headers = /usr/include/time.h
compilerOpts = -std=c99
Exception in thread "main" java.lang.Error: /usr/include/time.h:37:10: fatal error: 'bits/types/clock_t.h' file not found
at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:137)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.indexDeclarations(Indexer.kt:902)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:892)
at org.jetbrains.kotlin.native.interop.indexer.NativeIndexKt.buildNativeIndex(NativeIndex.kt:56)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:284)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:38)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:100)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:29)
Aregev2
07/24/2018, 1:36 PM#include <>
inside the header file itself?svyatoslav.scherbina
07/24/2018, 1:40 PMtime.h
etc are already available from platform libraries without any additional configuration. You can try to add import platform.posix.*
.Aregev2
07/24/2018, 1:55 PMAregev2
07/24/2018, 2:09 PMval x
to a variable (newbie question)svyatoslav.scherbina
07/24/2018, 2:12 PMAregev2
07/24/2018, 2:12 PMmsink
07/24/2018, 2:29 PMx
is Array - x.toCValues().ptr
Aregev2
07/24/2018, 3:04 PMval int = malloc(4)?.reinterpret<IntVar>()
println(int?.rawValue)
msink
07/24/2018, 3:12 PMmemScoped {
val time = alloc<time_tVar>()
time.value = v
return localtime(time.ptr)!!
}