2

Genie でリストを作成しようとしていますが、うまくいきません。コードのコンパイル:

[indent=2]
init
  var l = new list of string

次のエラーが発生します。

someone@someone-UBook:~/Documents$ valac helloworld.gs helloworld.gs:2.10-2.24: error: The name `Gee' does not exist in the context of `main'
    var l = new list of int
            ^^^^^^^^^^^^^^^
helloworld.gs:2.8-2.24: error: var declaration not allowed with non-typed initializer
    var l = new list of int
          ^^^^^^^^^^^^^^^^^
Compilation failed: 2 error(s), 0 warning(s)

libgee2 を (sudo apt-get install libgee2 経由で) インストールしましたが、何も変わりません。何か案は?

4

1 に答える 1

5

また、libgee の開発パッケージをインストールし (apt-get install libgee-dev)、それを使用するように valac に指示する必要があります (valac 引数に --pkg gee-0.8 を追加します)。

于 2011-12-27T19:41:50.870 に答える