Unable to run kotlinc-native command

Unable to run kotlinc-native command

Questions : Unable to run kotlinc-native command


I’m trying to run the Kotlin/Native Hello in4codes_kotlin Program but the terminal says the command in4codes_kotlin kotlin-native cannot be found. I’m on a in4codes_kotlin MacBook, using zsh (get same error when I in4codes_kotlin use bash) and installed Kotlin via Homebrew in4codes_kotlin before, so kotlin and it’s compiler works on in4codes_kotlin my machine, the kotlinc command works just in4codes_kotlin fine. I’m trying to use the compiler instead in4codes_kotlin of gradle for now. Is there a different in4codes_kotlin command I’m supposed to be using?

Total Answers 2

Answers 1 : of Unable to run kotlinc-native command

It sound like you may have had a similar in4codes_kotlin-multiplatform problem to me. Installing kotlin-native in4codes_kotlin-multiplatform via homebrew did not install the in4codes_kotlin-multiplatform kotlinc-native command.

To get the command working, I had to do in4codes_kotlin-multiplatform the following:

  1. Go to https://github.com/JetBrains/kotlin/releases and get the latest version of Kotlin
  2. Extract it to .kotlin in the home directory
  3. Add export PATH="$HOME/.kotlin/bin:$PATH" to .zshrc

The problem with this method is that in4codes_kotlin-multiplatform it’s completely disconnected from in4codes_kotlin-multiplatform Homebrew. You will have to run the steps in4codes_kotlin-multiplatform again every time you want to update in4codes_kotlin-multiplatform Kotlin.



Answers 2 : of Unable to run kotlinc-native command

You’ve typed kotlin-native but the in4codes_kotlin-multiplatform tutorial says kotlinc-native, which is in4codes_kotlin-multiplatform the actual name of the process file.

If kotlinc works then you might just in4codes_kotlin-multiplatform have a typeo.

I don’t use these processes directly, in4codes_kotlin-multiplatform but I’m somewhat familiar with them. My in4codes_kotlin-multiplatform guess is check the name.