Kotlin命令行编译器

5
我该如何使用js命令行编译器?
fun main(args: Array<String>): Unit { 
    println("Hello world!") 
}

E:\kotlinc\bin>kotlinc-js -output test -sourceFiles test.kt
ERROR: E:\kotlinc\bin\test.kt: (4, 5) Unresolved reference: println
exec() finished with COMPILATION_ERROR return code

在IDE中,我也无法让js编译工作。是否有适用于IntelliJ IDEA 12的最新入门指南?
1个回答

4

您需要指定库(kotlin-jslib.jar)的路径,请使用-libraryFiles命令行选项。


命令行编译器的文档位于:https://kotlinlang.org/docs/tutorials/command-line.html - Jayson Minard

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接