0

我正在尝试在 Eiffel 构建一个 hello world 程序,这就是我尝试的方式。我使用 Mac OS X 10.10。

  1. 我用brew install eiffelstudio. 一切正常,没有问题。我有所有的工具/usr/local/Cellar/eiffelstudio/14.05

  2. 我从这个站点想出了一个示例代码:https ://dev.eiffel.com/Compiling_Hello_World

这是代码。

class
    ROOT_CLASS
create
    make
feature -- Initialization 
    make
        -- Creation procedure.
        do
            io.put_string ("Hello World!")
        end   
end

我正在尝试将此代码构建为可以执行的二进制文件。

我试图ec hello.e得到这个错误信息。

Configuration error: Unknown root class.
What to do: Make sure that the name given in the Ace for the root
  class corresponds to a class of the universe. (If more than
  one, specify the cluster, see example in ETL D.2, page 514.)

可能有什么问题?

4

1 回答 1

2

文件名和类名应该相同,因此如果您将文件重命名为root_class.e或将类名更改为 read ,错误应该会消失HELLO

于 2015-03-24T14:13:19.143 回答