2017-03-11 2 views
1

Nach Anweisung hier: https://kotlinlang.org/docs/tutorials/command-line-library-js.html aber immer Invalid argument: -Bibliothek-Dateien beim Kompilieren. Ich bin mir nicht sicher, wo ich falsch gemacht habe. Jede Hilfe wird geschätzt.Kotlin Javascript -Bibliothek-Dateien ungültig Argument

Compiler erhalten von https://github.com/JetBrains/kotlin/releases/tag/v1.1

kotlin-compiler-1.1.zip

kotlinc-js -output binom.js -library-files sample-library.jar binom.kt 

Invalid argument: -library-files 
Usage: kotlinc-js <options> <source files> 
where possible options include: 
    -output <path>    Output file path 
    -no-stdlib     Don't use bundled Kotlin stdlib 
    -libraries <path>   Paths to Kotlin libraries with .meta.js and .kjsm files, separated by system file separator 
    -source-map    Generate source map 
    -meta-info     Generate .meta.js and .kjsm files with metadata. Use to create a library 
    -target { v5 }    Generate JS files for specific ECMA version 
    -module-kind { plain, amd, commonjs, umd } 
         Kind of a module generated by compiler 
    -main {call,noCall}  Whether a main function should be called 
    -output-prefix <path>  Path to file which will be added to the beginning of output file 
    -output-postfix <path>  Path to file which will be added to the end of output file 
    -language-version <version> Provide source compatibility with specified language version 
    -api-version <version>  Allow to use declarations only from the specified version of bundled libraries 
    -nowarn     Generate no warnings 
    -verbose     Enable verbose logging output 
    -version     Display compiler version 
    -help (-h)     Print a synopsis of standard options 
    -X       Print a synopsis of advanced options 
    -P plugin:<pluginId>:<optionName>=<value> 
         Pass an option to a plugin 

Antwort

3

Diese Option -libraries umbenannt wurde, bevor die JavaScript-Unterstützung hat sich als Teil Kotlin 1.1 veröffentlicht worden. Dieser Teil des Tutorials ist noch nicht auf dem neuesten Stand, ich werde es beheben. binom.kt:

+0

Jetzt Fehler mit binom.kt erhalten 8: 16: Fehler: nicht aufgelösten Verweis: forOdd (1..n) .forOdd {result = Ergebnis * it} ^ binom.kt: 8: 43: Fehler: nicht aufgelöste Referenz: it (1..n) .forOdd {Ergebnis = Ergebnis * it} – user7539473

Verwandte Themen