go 什么版本的?
go version 看一下
没有dep或者vgo来管理package吧?也就是有没有Gopkg.toml或者go.sum这样的文件?
go env 查看一下 GOARCH环境变量
用以下命令编译试试
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build
E:\goproject\src\go_code\project01\main>go run hello.go# runtime/internal/sysE:\GO\src\runtime\internal\sys\arch_wasm.go:8:24: ArchFamily redeclared in this block previous declaration at E:\GO\src\runtime\internal\sys\arch_amd64.go:8:24E:\GO\src\runtime\internal\sys\arch_wasm.go:8:24: undefined: WASME:\GO\src\runtime\internal\sys\arch_wasm.go:9:24: BigEndian redeclared in this block previous declaration at E:\GO\src\runtime\internal\sys\arch_amd64.go:9:24E:\GO\src\runtime\internal\sys\arch_wasm.go:10:24: CacheLineSize redeclared in this block previous declaration at E:\GO\src\runtime\internal\sys\arch_amd64.go:10:24E:\GO\src\runtime\internal\sys\arch_wasm.go:11:24: DefaultPhysPageSize redeclared in this block previous declaration at E:\GO\src\runtime\internal\sys\arch_amd64.go:11:24E:\GO\src\runtime\internal\sys\arch_wasm.go:12:24: PCQuantum redeclared in this block previous declaration at E:\GO\src\runtime\internal\sys\arch_amd64.go:12:24E:\GO\src\ru