go
语言在ubuntu linux
上配置win32
交叉编译环境简单记录一下软件环境的配置:
mingw64
sudo apt install mingw-w64
sudo apt install libz-mingw-w64-dev
gowin32c.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'