February 2019
Intermediate to advanced
450 pages
11h 59m
English
Building for Windows from another platform requires an installation of mingw (similar to what we installed on Windows to support CGo). The details for setting up cross-compilation can be found in the Cross compiling for Windows with CGo section of an Appendix, Cross-Compiler Setup.
The main steps are outlined here for quick reference:
Using your package manager (Homebrew on macOS and various on Linux), install the mingw package, which is usually named mingw-w64-clang or w64-mingw. If you cannot find this package, it can be installed directly using the instructions at https://github.com/tpoechtrager/wclang.
Once installed, we need to set up the appropriate build flags—specifically CC=x86_64-w64-mingw32-clang ...
Read now
Unlock full access