I just can not configure the GUI fyne-io. go get fyne.io/fyne
gave an error
package fyne.io/fyne: unrecognized import path "fyne.io/fyne" (https fetch: Get https://fyne.io/fyne?go- get=1: dial tcp: lookup fyne.io: no such host)
It’s good that IDE from JetBrains installed it from import
import (
"fyne.io/fyne/widget"
"fyne.io/fyne/app"
)
Then at go run there was an error
exec: “gcc”: executable file not found in %PATH%
Installation TDM-GCC helped solve the problem
And then I can not move.
package main
import (
"fyne.io/fyne/widget"
"fyne.io/fyne/app"
)
func main() {
app := app.New()
w := app.NewWindow("Hello")
w.SetContent(widget.NewVBox(
widget.NewLabel("Hello Fyne!"),
widget.NewButton("Quit", func() {
app.Quit()
}),
))
w.ShowAndRun()
}
After go run error
2019/03/26 13:51:11 Fyne error: failed to initialise OpenGL
2019/03/26 13:51:12 Cause: glClientWaitSync
2019/03/26 13:51:12 At: C:/gopath/src/fyne.io/fyne/driver/gl/window.go:834
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x10 pc=0x589c9d]
gl installed