Search code examples
valagenielibgee

Trying to make a list: The name `Gee' does not exist


I'm trying to make a list in Genie and it doesn't seem to work. Compiling the code:

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

produces these errors:

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)

I've installed libgee2 (via sudo apt-get install libgee2) and nothing changes. Any ideas?


Solution

  • You also need to install the development package for libgee (apt-get install libgee-dev) and tell valac to use it (add --pkg gee-0.8 to your valac arguments).