Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross compile windows from OS X #37

Open
drewwells opened this issue Jan 18, 2016 · 0 comments
Open

Cross compile windows from OS X #37

drewwells opened this issue Jan 18, 2016 · 0 comments

Comments

@drewwells
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant