在使用Fyne Golang编译项目时,它需要哪个路径?

huangapple go评论169阅读模式
英文:

which path it requires when compiling the project on fyne golang

问题

我正在使用golang和fyne编写一个计算机应用程序,当我尝试编译应用程序时,它抛出一个错误:"[✗] 在PATH中找不到引擎二进制文件"。我正在尝试使用以下命令编译项目:"fyne-cross windows -arch=*"。
版本信息:gcc-12.2.2
版本信息:go1.20.1 windows/amd64
lvwm: 15.07

重新安装golang
更改操作系统路径
在wsl下运行,但是出现了相同的问题
尝试不同的编译选项

英文:

I am writing a computer application in golang using fyne, and when I try to compile the application, it throws an error: "[✗] engine binary not found in PATH". I'm trying to compile the project with the command: "fyne-cross windows -arch=*".
version: gcc-12.2.2
version go1.20.1 windows/amd64
lvwm: 15.07

set GO111MODULE=on
set GOARCH=amd64
set GOBIN=C:\\Go\\bin
set GOCACHE=C:\\Users\\zajro\\AppData\\Local\\go-build
set GOENV=C:\\Users\\zajro\\AppData\\Roaming\\go\\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\\projects\\gopher\\pkg\\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windowsset GOPATH=C:\\projects\\gopher
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\\Go\\pkg\\tool\\windows_amd64
set GOVCS=
set GOVERSION=go1.20.1
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\\projects\\gopher\\astro_guide\\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\\Users\\zajro\\AppData\\Local\\Temp\\go-build3536019425=/tmp/go-build -gno-record-gcc-switches

reinstall golang
to change os path
to run from under wsl, but there is the same problem
different compilation options

答案1

得分: 1

如果你正在使用Windows并且要编译Windows应用程序,我建议你使用fyne package命令,而不是fyne-cross。后者需要安装Docker或podman实例,因为它用于交叉编译。

英文:

If you are on Windows and compiling for Windows I would recommend the fyne package command instead of fyne-cross. The latter requires an installed Docker or podman instance as it’s for cross compiling.

huangapple
  • 本文由 发表于 2023年3月5日 02:41:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/75637850.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定