Microsoft Windows
For Cgo to function on Windows, you'll need to have the gcc (or compatible) compiler installed. If Visual Studio is already installed, then you may have a C compiler. For those who don't, this section steps through configuring a build environment on the command line. The easiest way to get up and running (in my experience) is to download and install MSYS2 (a software distribution) and build a platform for Windows. Using MSYS2, we can install the mingw-w64 packages, which provide an updated distribution of the gcc for Windows project named mingw.
Download the installer from www.msys2.org/—choose either the 32 bit (i686) or 64 bit (x86_64) versions, depending on your computer architecture. Once downloaded, run this installer, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access