Skip to content

Instantly share code, notes, and snippets.

@JanGalek
Last active October 11, 2018 21:35
Show Gist options
  • Save JanGalek/66d57f2eddbdc1449a50034bcd839657 to your computer and use it in GitHub Desktop.
Save JanGalek/66d57f2eddbdc1449a50034bcd839657 to your computer and use it in GitHub Desktop.

How to build go from linux to windows

https://hub.docker.com/_/golang/

OLD - not working (tested with Windows 10)

Install

sudo apt-get install gcc 
sudo apt-get install mingw-w64
sudo apt-get install enlightenment
sudo apt-get install libeina-dev
sudo apt-get install libeina1

one line command

sudo apt-get install gcc  mingw-w64 enlightenment libeina-dev libeina1

Optional - for https://github.com/fyne-io/fyne

sudo apt-get install libefl
sudo apt-get install libefl-dev 

Compile

CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ GOOS=windows GOARCH=amd64 sudo go build -o main.exe .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment