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 done on Windows, or is it something that Google hasn't implemented yet?
It hasn't made it onto the Go Lang FAQ yet, but from the changelog:
Why doesn't Go run on Windows? We understand that a significant fraction of computers in the world run Windows and it would be great if those computers could run Go programs. However, the Go team is small and we don't have the resources to do a Windows port at the moment. We would be more than willing to answer questions and offer advice to anyone willing to develop a Windows version.
Despite the fact that Go is only two days old, this question has already become a FAQ on the Go mailinglist. (Unfortunately, it has not yet been added to the FAQ list on the website.)
Basically, Go is done by a very small group of people, so they simply do not have the time nor the resources to do a Windows port. That very small group of people also happens to be the people who invented Unix, so that was kind of a natural first target.
Not yet.
The authors of Go have very very deeply roots on non Windows operating systems ( Trivia: who of them created no less than the very UNIX operating system )
So, don't expect to have a Windows port from them any time soon.
The language is open source, so it will be just a matter of time ( make it from 6 - 8 ehrm months ) for a Windows implementation will be available.
Thats smart, no windows port. In the true spirit of sun trying to cut out microsoft, now .NET is more powerful than ever, and IBM controls java. Microsoft may suck, but they suck on 90+ % of computer, no microsoft, no go.
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.
Although there is no Windows version at the moment, it can presumably be compiled using Cygwin on a Windows platform.
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/
I guarantee it will be on Windows. :-) It is too cool not to. A lot of game developers will embrace this language over time. Great work GO team !!!!
Full disclosure: I am the lead developer on this project and owner of the company in question. Nevertheless, I think it's a direct answer to the question. I spent a long time pondering whether to jump in here, and even dug through the FAQs on Meta Stack Overflow to see what the general feeling on etiquette for this kind of answer was, and it seems to be OK, so here goes.
My company is currently working on a Go compiler for Windows that, as far as I know, is the only 100% Windows-native (ie, it doesn't require Cygwin or MinGW to run) and also the first commercial Go compiler in the works. We have this product fast tracked, and expect to have a public beta test sometime in the first quarter of 2010.
Initial Windows Port of Go Language can be downloaded from here: http://code.google.com/p/go-windows/
As suggested above I got ubuntu on the windows machine (with virtualbox) & then got go.
Have a look at
Summary
- Download and extract the zip-file on WindowsPort.
- Add four environment variables and edit your
PATH
. See below. - Compile, link and execute your
HelloWorld.go
Environment variables needed on Windows:
GOARCH = 386
GOBIN = <your path to go\bin> I.e C:\go\bin
GOOS = windows
GOROOT = <your path to \go> I.e. C:\go
PATH
add%GOBIN%
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
If you're looking for a Windows port of Go, like I was; This video over at YouTube was very helpful. Got me all setup and coding in about 15 minutes:
Beginner's Guide - Using Go on Windows
I hope this helps.
I used Go Language on Windows with IntelliJ plugin. http://www.philipandrew.com/?p=46