Skip to content

Installing the development toolchain on Microsoft Windows

The easy part

For most required tools you can just grab an installer, execute it and you're ready to go. This is true for:

PowerShell should already be installed when you're running a recent version Microsoft Windows.

The tricky part

To build the go bindings for OpenGL your system needs to be capable of compiling C++ code. Easiest way I found so far is using MSYS2 to setup a MinGW64 installation. For that just follow the instructions on the msys2 website. When the installer is about to finish, select the option "Run MSYS2 now".

In the new console window you should type the following command:

pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain

When asked for what you want to install you should select the option to install all packages. This will take a moment and leave you with a full development toolchain installed.

Now add the folders containing the compiler to the Path environment variable:

Environment variables

The folders to add are:

  • C:\msys64\ucrt64\bin
  • C:\msys64\usr\bin

Now open a new terminal process (so that the environment variable is passed to it). Then enter the following command:

gcc --version

You should now see something like this:

GCC in Windows