Skip to content

Building on Windows

Conrad Ramos edited this page May 15, 2022 · 3 revisions

Building on Windows

  1. Download the Go distribution for Windows here
  2. Follow the instructions here for setting up your GOPATH.
  3. Open a command prompt and run set CGO_ENABLED=0
  4. In the same command prompt run go get -u github.com/odeke-em/drive/cmd/drive
  5. Profit!

##Pitfalls

If you get an error message about missing libraries similar to the following:

C:\> set CGO_ENABLED=0
C:\> go get -u github.com/odeke-em/drive/cmd/drive
# github.com/odeke-em/drive/src
C:\go\src\github.com\odeke-em\drive\src\tty.go:20:21: fatal error: termios.h: No such file or directory  
#include <termios.h>
                    ^
compilation terminated.

Try again with the CGO_ENABLED defined as an environment variable (with value 0) under Advanced tab in Control Panel->System. After defining the parameter, start a new command prompt and run the go get -u github.com/odeke-em/drive/cmd/drive command again.