版本:go 1.19.1,
操作系统:windows/amd64
相同代码,同机器。直接编译没问题
```go build -ldflags "-s -w -H=windowsgui" main/sqlCheck.go```
想编译成x86的liunx版本的,报错。具体执行操作(命令窗口)
SET CGO_ENABLED=0
SET GOOS=liunx
SET GOARCH=amd64
go build -ldflags "-s -w -H=windowsgui" main/sqlCheck.go或
go build main/sqlCheck.go
报错信息如下
D:\go_proj\src\sc_sqlcheck-shell>go build -ldflags "-s -w -H=windowsgui" main/sqlCheck.go
package command-line-arguments
imports fyne.io/fyne/v2/app
imports fyne.io/fyne/v2/internal/driver/glfw
imports fyne.io/fyne/v2/internal/driver/common
imports fyne.io/fyne/v2/internal/painter/gl
imports github.com/go-gl/gl/v3.2-core/gl: build constraints exclude all Go files in D:\go_proj\pkg\mod\github.com\go-gl\gl@v0.0.0-20211210172815-726fda9656d6\v3.2-core\gl
有疑问加站长微信联系(非本文作者)