Cross compile windows from OS X
drewwells opened this issue · 0 comments
drewwells commented
Install mingw with this script https://gist.github.com/drewwells/ee5d42dc29b70b7b61af
Now you should be able to issue this,
GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-ming32-gcc CXX=i686-w64-mingw32-g++ CGO_LDFLAGS="-static" go build -i -v -x -ldflags "-extldflags '-static' -extld=$CC"
Would be nice to have the gist script turned into a homebrew package.