Is there a way to bypass KotlinX CLI? Every time a...
# compiler
n
Is there a way to bypass KotlinX CLI? Every time an attempt is made to generate a static library file using
kotlinc-native -nostdlib -p static -target rp2040 src
the following error appears:
Copy code
warning: skipping /home/napperley/repos/kotlin/kotlin-native/dist/klib/common/org.jetbrains.kotlinx.kotlinx-cli. The target doesn't match. Expected 'rp2040', found [linux_x64]
error: could not find "/home/napperley/repos/kotlin/kotlin-native/dist/klib/common/org.jetbrains.kotlinx.kotlinx-cli" in [/home/napperley/vscode_projects/rp2040_hello, /home/napperley/.konan/klib, /home/napperley/repos/kotlin/kotlin-native/dist/klib/common, /home/napperley/repos/kotlin/kotlin-native/dist/klib/platform/rp2040]
a
it’s a warning, not an error. What problems does it cause? my mistake, I see the error Do you know what is requesting kotlinx-cli?
n
Found a solution that bypasses the KotlinX CLI requirement. Arguments can be passed to the Kotlin Native compiler. One of these arguments is
-no-endorsed-libs
which causes the compiler to not include endorsed libraries (non core Kotlin libraries incl KotlinX CLI) with a Kotlin program, Shared library, Static library, or anything else that the compiler can produce.