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?
Update: appears that as of now (Nov. 2012) golang.org has official binary releases for windows 32/x86_64.
Download go for Windows First, go to golang.org and click on “Download Go“. It will lead to the download page. There you will have to select the msi installer for windows.
Go is a compiled language. This means we must run our source code files through a compiler, which reads source code and generates a binary, or executable, file that is used to run the program. Examples of other popular compiled languages include C, C++, and Swift.
Often the release page would have windows executable but no instructions on how to compile on Windows, only on mac/linux with make There are no more Makefiles needed in Go, so the make tool isn't necessary. You also do not need cygwin.
Let’s start installing GoLang on Windows. 1. Download go for Windows. First, go to golang.org and click on “ Download Go “. It will lead to the download page. There you will have to select the msi installer for windows. Go download for Windows amd64. 2. Install go from .msi file.
Go install. Select the tab for your computer's operating system below, then follow its installation instructions. Open the MSI file you downloaded and follow the prompts to install Go. By default, the installer will install Go to Program Files or Program Files (x86). You can change the location as needed.
gofmt.com/compile.htmlif you want to try some non-destructive Go programming on Windows. It can compile, link, and run your programs and show you the output. Please send me a private message if you find any vulnerability on that site. Thanks! – Randy Sugianto 'Yuku' Nov 18 '09 at 18:36 Update: erGo compiler was released for beta testing this week.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With