试图列出一个清单:名字“Gee”;不存在

发布于 2024-12-22 19:45:40 字数 612 浏览 4 评论 0原文

我正在尝试在 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)并且没有任何变化。有什么想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

送君千里 2024-12-29 19:45:40

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

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文