2020年12月20日星期日

Issue with flyne when creating GUI

Golang code:

package main    import (      "fyne.io/fyne/app"      "fyne.io/fyne/widget"  )    func main() {      application := app.New()      window = application.NewWindow("Hello rohan")        window.SetContent(widget.NewLabel("Hello again"))      window.ShowAndRun()  }  

When this code is executed, I get the following error.

# 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  No package 'gl' found  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  No package 'gl' found  pkg-config: exit status 1  # fyne.io/fyne/vendor/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/src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.3/glfw/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.  

Any solutions or advice on this issue would be much appreciated. P.S I am using Go version 1.13.8 and an ubuntu 20.04 WSL on windows.

https://stackoverflow.com/questions/65387167/issue-with-flyne-when-creating-gui December 21, 2020 at 11:17AM

没有评论:

发表评论