Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
2.58k
stars
268
forks
source link
Go Cross-Compile build windows exe on mac : cannot find module for path github.com/lxn/win #305
Closed
gitgitcode closed 3 years ago
version of Go
go version go1.13.7 darwin/amd64
go env
GO111MODULE="on" GOARCH="amd64" GOBIN="" GOCACHE="/Library/Caches/go-build" GOENV="/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Golan/goWorkSpace" GOPRIVATE="" GOPROXY="https://goproxy.cn,direct" GOROOT="/usr/local/opt/go/libexec" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/fnfig/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/w5/x6zbdtkn3tggr0q54dl31j840000gn/T/go-build959481107=/tmp/go-build -gno-record-gcc-switches -fno-common"
Cross-Compile build windows exe on mac
run
$GOOS=windows GOARCH=amd64 go build
get error
build fnfig: cannot find module for path github.com/lxn/win
run
GOOS=windows GOARCH=386 go build
error
build fnfig: cannot find module for path github.com/lxn/win
cat go.mod
if build other file not require github.com/lxn/win its successful
GOOS=windows GOARCH=386 go build -x
... ...mv $WORK/b001/exe/a.out.exe test.exe
ls main.go test.exe
so how to build to be successful ? or where can i get some log