Anybody tried to compile Go on Windows?, It appears to now support generating PE Format binaries
c, c++, compilation, go, windows
Solution
Assuming you are using Hector's source tree:
- Install MinGW and MSYS, along with MSYS Bison and any other tools you think you'll find useful (vim, etc).
- Install ed from the GNUWin32 project.
- Install Python and Mercurial.
- Clone the [hectorchu-go-windows mercurial repository](https://hectorchu-go-windows.googlecode.com/hg/ hectorchu-go-windows) to `C:\Go`.
- Run an MSYS shell (or rxvt). The rest of these are bash commands...
- `mkdir $HOME/bin`
- `export PATH=$HOME/bin:$PATH`
- `export GOROOT=C:\\Go`
- `export GOARCH=386`
- `export GOOS=mingw`
- `cd /c/Go/src`
- `./all.bash`
- Correct errors as it spits them out at you, repeat step 10 until it starts building.
It's the same idea as on Linux or MacOS, basically.
However, I still stand by what I said in my comment above: this isn't necessarily going to generate anything that actually works yet. You'd be better served by waiting until this effort has merged into the main Go tree before tackling it, unless your interest is in assisting with the porting effort.
Update: there is now a mostly-functional pre-built windows port available, for those not interested in building the compiler themselves. However, given the rate of change of the project, the lack of formal releases (other than the hg "release" tag), and the possibility of Hector's changes being merged into the main branch soon, keeping up with development via source builds is likely to produce better results over time.
Problem
http://code.google.com/r/hectorchu-go-windows/source/list If you could compile it successfully, I like to know the procedures of how to.