Jacob Ras10/05/2023, 4:18 PM
Why do I need to build my KMP library on a Mac when it only has code in the
"Some Kotlin/Native targets cannot be built on this mingw_x64 machine and are disabled"
source set and doesn't do anything with Cocoapods et cetera? The K/N documentation states: > By default, a Kotlin/Native target is compiled down to a
library artifact, which can be consumed by Kotlin/Native itself as a dependency but cannot be executed or used as a native library. So I would expect that only later, when the library is being used in a project that actually builds an
and such, a Mac is needed. Can somebody help me understand this?
a-dd10/05/2023, 5:10 PM
isn’t in fact some common kotlin dialect (for now). It’s an intersection of capabilities of declared targets. And for compiling Apple-targets Kotlin/Native needs Xcode tooling and headers which are only available on macOS. See https://youtrack.jetbrains.com/issue/KT-52666/Kotlin-Multiplatform-libraries-without-platform-specific-code-a.k.a.-Pure-Kotlin-libraries-Universal-libraries