這是本文件的舊版!


Cross compile

Make sure the toolchain for windows is installed.

sudo pacman -S mingw-w64-gcc

32bit

CGO_ENABLED=1 CC=i686-w64-mingw32-gcc GOOS=windows GOARCH=386 go build -o gorvp.exe main.go

64bit

CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -o gorvp.exe main.go