kotlin命令行编译器 [英] kotlin command line compiler

查看:120
本文介绍了kotlin命令行编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用js命令行编译器?

How do I use the js command line compiler?

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的最新入门指南?

In the IDE I couldn't get js compilation to work either. Is there an up to date getting started guide for IntelliJ IDEA 12?

推荐答案

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

You need to specify a path to the library (kotlin-jslib.jar), use -libraryFiles command line option

这篇关于kotlin命令行编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆