# multiplatform

Joris PZ

12/07/2019, 6:53 PM
Hi all, I'm participating in Advent of Code ( this year again, and just like last year, I'm trying to write my solutions in Kotlin common code, compile to bytecode, JS and native (MinGW), and do some rudimentary performance comparisons. Now, for today's puzzle I have added coroutines, and suddenly my MPP project fails to build. I have fiddled with absolutely everything - kotlin plugin version, gradle version, JDK version, library versions, in every permutation I could think off, but my build keeps failing with the completely unhelpful
Copy code
Execution failed for task ':linkDebugExecutableMingw'.
> Process 'command 'C:\dev\java\openjdk-11.0.2\bin\java.exe'' finished with non-zero exit value 1
Before I throw in the towel and just continue on JVM alone, if anyone would be willing to take a look to see what I could be doing wrong it would be much appreciated. The repo is, the project is pretty much standard as generated by IDEA, with the addition of the coroutine depenendencies.
Ah nevermind, the problem turned out to be that apparently in Kotlin Native you can't have a
suspend fun main
as an entry point... The error got lost in the noise somehow, so nothing to do with the build stuff


12/08/2019, 5:40 PM
How does your main function look then?
Coroutines core works also on mingw, right?
Been also working on a little windows tool and it's been quite the learning experience

Joris PZ

12/08/2019, 6:04 PM
Oh I just went from
suspend fun main(args: Array<String>) {}
Copy code
fun main(args: Array<String>) {
    runBlocking {
        // ...
So yeah they work in mingw, though I understand only single-threaded and on the main thread for now due to <> which is why I believe that the single-threaded nature of
isn't an extra burden
👍 1