最近在学go的GUI编程,go build 的时候报错了!大佬来看看可好?

deyen · · 5268 次点击 · 开始浏览    置顶
这是一个创建于 的主题,其中的信息可能已经有所发展或是发生改变。

go代码如下: ``` 1 │ package main 2 │ 3 │ import ( 4 │ "fyne.io/fyne/app" 5 │ "fyne.io/fyne/widget" 6 │ ) 7 │ 8 │ func main() { 9 │ a := app.New() 10 │ w := a.NewWindow("hello!GUI") 11 │ 12 │ w.SetContent(widget.NewLabel("what?!")) 13 │ w.ShowAndRun() 14 │ } ``` 我go build之后,就提示下面的报错 ``` # pkg-config --cflags -- gl gl Package gl was not found in the pkg-config search path. Perhaps you should add the directory containing `gl.pc' to the PKG_CONFIG_PATH environment variable Package 'gl', required by 'virtual:world', not found Package 'gl', required by 'virtual:world', not found pkg-config: exit status 1 # github.com/go-gl/glfw/v3.3/glfw In file included from ./glfw/src/internal.h:188, from ./glfw/src/context.c:30, from ../../../go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20211213063430-748e38ca8aec/c_glfw.go:4: ./glfw/src/x11_platform.h:36:10: fatal error: X11/Xcursor/Xcursor.h: No such file or directory 36 | #include <X11/Xcursor/Xcursor.h> | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ``` 就行是什么情况?该怎么解决呢?

有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

5268 次点击  
加入收藏 微博
18 回复  |  直到 2023-01-28 20:54:54
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传