Search code examples
windowsgobinarydesktop-applicationfyne

which path it requires when compiling the project on fyne golang


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


Solution

  • 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.