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开放的接口,gopher们也可以像fyne那样使用炫彩来写界面。
看他的官方简介好像写出来的效果还不错。不知道fyne能否实现不,正在尝试学习fyne中。
#14