This is an extremely brief guide to setting up Go on Windows. There are plenty of guides out there for setting up Go, but none that also include how to get your Makefiles working cross-platform easily. The easiest way I’ve found to do this is to change shells. This is especially true if you have Makefiles like I do, where $(shell) is everywhere. With the default shell you’ll end up with CREATE PROCESS(NULL, ... errors everywhere because functionality is missing.
-
The default installer on Windows works great for Go now. It’ll set up
$GOPATHto be%USERPROFILE\goand$GOROOTto beC:\go. It’ll also modify your$PATHto beC:\go\bin. -
Download Make for Windows. Add the installation path to your
$PATH. -
Download Cygwin.
-
From Cygwin,
cd C:/users/blah/go/src/github.com/blah/somerepo, and from there you should be able to runmake.