ianrumac
10/28/2021, 1:44 PMkotlinc-native test.kt -nomain
it fails with
“could not find ‘main’ in ‘<root>’ package.”Same thing happens until I strictly provide a entry point with -e and the entry point method needs to have either 0 args or an arg array. Is there a way to compile it without having a main method? I thought
-nomain
option does that already but it just turns out ignored 🤔
fun run(args: Array<String>, result: Test){
val array = args
array[0] = "42"
result.res(array[0])
}
interface Test {
fun res(string: String)
}
mkrussel
10/28/2021, 1:55 PMianrumac
10/28/2021, 2:25 PMianrumac
10/28/2021, 2:29 PM