Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/go/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Golang GUI fyne io帮助设置?_Go - Fatal编程技术网

Golang GUI fyne io帮助设置?

Golang GUI fyne io帮助设置?,go,Go,我就是不能配置GUI获取fyne。io/fyne给出了一个错误 包fyne.io/fyne:无法识别的导入路径“fyne.io/fyne”(https fetch:Get get=1:拨号tcp:查找fyne.io:没有这样的主机) JetBrains的IDE通过导入安装了它,这很好 导入( “fyne.io/fyne/widget” “fyne.io/fyne/app” ) 然后在开始运行时出现错误 exec:“gcc”:在%PATH%中找不到可执行文件 安装帮助解决了这个问题 然后我就不能动

我就是不能配置GUI<代码>获取fyne。io/fyne给出了一个错误

包fyne.io/fyne:无法识别的导入路径“fyne.io/fyne”(https fetch:Get get=1:拨号tcp:查找fyne.io:没有这样的主机)

JetBrains的IDE通过导入安装了它,这很好

导入(
“fyne.io/fyne/widget”
“fyne.io/fyne/app”
)

然后在开始运行时出现错误

exec:“gcc”:在%PATH%中找不到可执行文件

安装帮助解决了这个问题

然后我就不能动了

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()
}
后运行错误

2019/03/26 13:51:11 Fyne错误:初始化OpenGL失败

2019/03/26 13:51:12原因:glClientWaitSync

2019/03/26 13:51:12 At:C:/gopath/src/fyne.io/fyne/driver/gl/window.go:834

死机:运行时错误:无效内存地址或零指针取消引用

[信号0xc0000005代码=0x0地址=0x10 pc=0x589c9d]


已安装的

问题1在DNS查找中看起来像是一个临时问题-IDE很快就解决了它。 问题2在找到解决方案方面做得很好。 问题3:你最好在GitHub跟踪器[1]上提出一个bug,详细说明你的windows版本和硬件,以便与你一起工作


1:

来自fyne文档

By default Fyne uses the gl golang bindings which means you need a working OpenGL configuration. Debian/Ubuntu based systems may also need to install the libgl1-mesa-dev and xorg-dev packages.
什么是OpenGL? OpenGL是一种独立于操作系统、独立于窗口系统的图形渲染API,具有由几何图元和图像原语组成的高质量彩色图像

OpenGL APIs can use following …

Gl
    OpenGL API implementation (http://www.opengl.org)
Glu
    OpenGL Utility
Glut – GLUT (OpenGL Utility Toolkit) – Glut is portable windowing API and it is not officially part of OpenGL.
    OpenGL Utility Toolkit (http://www.opengl.org/resources/libraries/glut/)
FLTK
    FlashLight ToolKit (http://www.fltk.org/)
GLEW…
运行以下命令以安装OpenGL

sudo apt-get update
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev

您的图形驱动程序可能已过期。其他一些人报告说,通过更新驱动程序,这个问题已经自行解决。

这个有用的答案包括特定于Linux的命令,但这个问题与Windows有关。我们发现了一个问题,一些Windows计算机将默认使用OpenGL支持似乎不完整的图形卡。您是否也有多种图形硬件(在中高规格笔记本电脑中很常见)?