I recently checked out the kotlin multiplatform sa...
# multiplatform
p
I recently checked out the kotlin multiplatform sample project from the KMP site in Fleet in a mac machine. I am able to run desktop app from the fleet directly but when I try to run the gradle package for windows it's not exporting a windows native binary although it is exporting DMG for mac fine.
j
How exactly do you run that? It is necessary to cross-compile, but should be possible with mingw according to what I can see in https://youtrack.jetbrains.com/issue/KT-43024/Kotlin-Native-Windows-as-cross-compilation-target
p
I am doing gradlew packageMsi
j
Do you have the mingw installed? Do you get any error messages?
p
Unaware of mingw and how to export a windows executable through it. There's no such document available anywhere. Can you point me to a step guide?
j
I haven't tried it myself; the thing is that to produce a Windows executable on a Mac, you need to cross-compile, and mingw allows you to do that. See the bug I've pointed to, it has some info, and at the end, there is even a pointer to a project that is supposed to build a Windows executable on a Mac, so IIWY, I'd try that, and then if you succeed with that, try to apply the knowledge to your project too.
p
Ok, let me go through it.
Thanks for pointing
What if I open this project in a windows PC, will the gradlew package do a windows executable instead of dmg?
j
It should, yes; though again - I haven't done this myself, it is based on assumptions 🙂