试图制作一个清单:名称"Gee"不存在

web*_*rc2 2 vala genie libgee

我正试图在Genie中列出一个列表并且它似乎不起作用.编译代码:

[indent=2]
init
  var l = new list of string
Run Code Online (Sandbox Code Playgroud)

产生这些错误:

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)
Run Code Online (Sandbox Code Playgroud)

我已经安装了libgee2(通过sudo apt-get install libgee2),没有任何改变.有任何想法吗?

nem*_*equ 5

您还需要为libgee(apt-get install libgee-dev)安装开发包,并告诉valac使用它(将-pkg gee-0.8添加到您的valac参数中).