One thing I conceptually don't understand yet is t...
# multiplatform
j
One thing I conceptually don't understand yet is this error:
"Some Kotlin/Native targets cannot be built on this mingw_x64 machine and are disabled"
Why do I need to build my KMP library on a Mac when it only has code in the
common
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
*.klib
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
XCFramework
and such, a Mac is needed. Can somebody help me understand this?
a
common
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