Monday, May 16, 2011

Mini crash course how to setup Go language on windows machine

You should download the following software:

1. MinGW-get. This utility will install mingw and msys. Then installing select both mingw and msys.
2. Windows port of Go language compiler and tools

Now then everything is installed you should setup the following system variables:

1. “GOARCH” (set value to “386” without quotes)
2. “GOBIN” (set value to path to bin directory of your Go compiler for example “c:\go\bin”)
3. “GOOS” (set value to “windows” without quotes)
4. “GOROOT” (set value to path to root directory of your Go compiler for example “c:\go”)

You should append mingw, msys and gobin bin directories to system path variable (for example C:\MinGW\bin;C:\MinGW\msys\1.0\bin;%GOBIN%)

All done and now you can build applications with Go language on your windows machine.