【问题标题】:Erlang hello world problem?Erlang hello world 问题?
【发布时间】:2011-09-29 01:28:34
【问题描述】:

我不明白为什么这不起作用:

    -module(hello).
    -export([hello_world/0]).

    hello_world() -> io:fwrite("hello, world\n").

(hello_world@PC)8> hello:hello_world().
** exception error: undefined function hello:hello_world/0
(hello_world@PC)9> 

【问题讨论】:

    标签: erlang


    【解决方案1】:

    您是否编译了源代码?在调用函数之前,在 Eshell 中输入c(hello).(假设hello.erl 是源文件的名称)。

    【讨论】:

    【解决方案2】:

    解决方法:

    转到: 运行配置
    --二郎
    选择标签:
    --环境
    然后
    --选择
    检查
    -- 路径
    应用并运行。

    现在你可以开始了。

    【讨论】:

      猜你喜欢
      • 2012-09-07
      • 1970-01-01
      • 1970-01-01
      • 2014-07-19
      • 1970-01-01
      • 2011-05-12
      • 2012-08-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多