scala本机运行演示

时间:2016-06-07 11:33:43

标签: sbt demo scala-native

成功构建scala本地尝试使用以下命令运行演示

 cd scala-native
 sbt demoNative/run

返回以下错误

/home/rimashm/.scalanative/rtlib-0.1-SNAPSHOT/rt.cpp:1:10: fatal error: 'exception' file not found \#include <exception> 1 error generated. 
java.io.IOException: Cannot run program "/home/rimashm/MITScriptTest/scala-native/demo/native/target/scala-2.11/demonative-out": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
[trace] Stack trace suppressed: run last demoNative/*:run for the full output. [error] (demoNative/*:run) java.io.IOException: Cannot run program "/home/rimashm/MITScriptTest/scala-native/demo/native/target/scala-2.11/demonative-out": error=2, No such file or directory [error] Total time: 16 s, completed Jun 7, 2016 4:58:18 PM

1 个答案:

答案 0 :(得分:1)

Scala Native在https://github.com/scala-native/scala-native/blob/master/rtlib/src/main/resources/rt.cpp中包含几行C ++代码。鉴于您的错误消息,似乎此部分无法编译。这可能是由缺少libc ++的标头引起的。