Building for Windows from another platform requires an installation of the mingw toolchain (similar to that which we installed on Windows to support CGo). This should be available in your package manager with a name similar to mingw-w64-clang or w64-mingw, but if not, you can install directly using the instructions at https://github.com/tpoechtrager/wclang.
Cross compiling for Windows with CGo
To Windows from macOS
To install the packages on macOS, it's recommended to use the Homebrew package manager. You probably already have this installed from earlier chapters in this book (for example, when setting up the GTK+ library), but if not, you can download it from https://brew.sh. Once Homebrew is set up, the compiler...