I\'ve been looking on golang.org for a Windows compiler, but I can\'t seem to find it. I can only see Linux and OS X compilers. Does anyone know if Go programming can be don
There are now installers for Windows, see Go under Windows
HelloWorld.go
package main
func main() {
println("Hello World!");
}
Compile with 8g
, link with 8l
and then execute. Example:
8g HelloWorld.go
8l -o HelloWorld.exe HelloWorld.8
HelloWorld
Although there is no Windows version at the moment, it can presumably be compiled using Cygwin on a Windows platform.
Installation of Go on windows is straight forward if you use the experimental x32 windows port . Documentation of the steps for Go installation on windows can found here
You will probably also want the MinGW tools (bash, make, gcc, etc...): http://sourceforge.net/projects/mingw/files/
and the GTK+ files and tools (the "all-in-one bundle" includes pkg-config): http://www.gtk.org/download/win32.php
Various efforts to port Go to windows are underway.
The most advance and that can already build and run some code is here: http://code.google.com/r/hectorchu-go-windows/
Yes! As of 2012 the Go homepage offers an official Windows installer (32 or 64 bit) https://golang.org/dl/
So if you, like me, are on Windows a lot of the time and want to do some Go programming right now, you can do it on a VM. I use VirtualBox running Ubuntu in seemless mode. I already had it set up because I like Linux better than Windows for a lot of things.
Building and working with Go has been totally painless for me. I have a Bash open in a terminal to run my build and try my app. The source directory is a shared folder between Windows and Linux (a VirtualBox feature but I'm sure VMWare has the same thing). I edit my code in Komodo Edit on Windows and use Mercurial for the same source code on both OSes.