Skip to content

Instantly share code, notes, and snippets.

@alexniver
Created January 20, 2019 11:26
Show Gist options
  • Save alexniver/ebb9eae7432fb19ab4234f25ec678b0a to your computer and use it in GitHub Desktop.
Save alexniver/ebb9eae7432fb19ab4234f25ec678b0a to your computer and use it in GitHub Desktop.
如何在ubuntu上编译出windows的可执行文件
sudo apt-get install mingw-w64
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build main.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment