Open PritishMishraa opened 3 months ago
same problem on windows.
> go build -ldflags="-H windowsgui" ./cmd/test
github.com/webview/webview_go: build constraints exclude all Go files in C:\Users\*\go\pkg\mod\github.com\webview\webview_go@v0.0.0-20240220051247-56f456ca3a43
after a while googling, using the following fix things for me (but only for a while 😭):
go clean -modcache
You may also need to set the CGO_ENABLED=1
environment variable if you are doing cross-compilation. Also be sure to have the necessary cross-compilation toolchain on your system and that your CC
and CCX
environment variables are using the correct toolchains: https://github.com/webview/webview_go/issues/18#issuecomment-1851966915
can not build when running the command
GOOS=darwin GOARCH=amd64 go build
error:
github.com/webview/webview_go: build constraints exclude all Go files in /Users/pritishmishra/go/pkg/mod/github.com/webview/webview_go@v0.0.0-20240220051247-56f456ca3a43
but the go build command works. if I do this
go build .
my go env:
go version:
go version go1.22.1 darwin/arm64
g++ version:Apple clang version 15.0.0 (clang-1500.3.9.4) Target: arm64-apple-darwin23.4.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin