

go语言在ubuntu linux上配置win32交叉编译环境简单记录一下软件环境的配置:
mingw64sudo apt install mingw-w64sudo apt install libz-mingw-w64-devgowin32c.sh#!/bin/sh
export CGO_ENABLED=1
export GOOS=windows
export GOARCH=386
export CC=i686-w64-mingw32-gcc
export CXX=i686-w64-mingw32-g++
go build -ldflags '-s -w'
gowin32w.sh#!/bin/sh
export CGO_ENABLED=1
export GOOS=windows
export GOARCH=386
export CC=i686-w64-mingw32-gcc
export CXX=i686-w64-mingw32-g++
go build -ldflags '-s -w -H=windowsgui'