编译windows文件
SET CGO_ENABLED=1
SET GOARCH=
SET GOOS=windows
go build
编译Linux文件
SET CGO_ENABLED=0
SET GOARCH=amd64
SET GOOS=linux
go build
SET CGO_ENABLED=1
SET GOARCH=
SET GOOS=windows
go build
SET CGO_ENABLED=0
SET GOARCH=amd64
SET GOOS=linux
go build
本文标题:Golang 编译Linux或Windows可执行文件
本文链接:https://www.haomeiwen.com/subject/pwzarqtx.html
网友评论