英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论