github twitter linkedin email
Installing Go on Windows (including Make)
Jul 7, 2018
One minute read

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.

  1. The default installer on Windows works great for Go now. It’ll set up $GOPATH to be %USERPROFILE\go and $GOROOT to be C:\go. It’ll also modify your $PATH to be C:\go\bin.

  2. Download Make for Windows. Add the installation path to your $PATH.

  3. Download Cygwin.

  4. From Cygwin, cd C:/users/blah/go/src/github.com/blah/somerepo, and from there you should be able to run make.





Back to posts