From 638806b2cc9c72dc5f65c95e4d071e84ed6851cc Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Thu, 27 May 2021 15:22:46 -0400 Subject: [PATCH] merge bitcoin#22088: improve note on choosing posix mingw32 --- doc/build-windows.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/doc/build-windows.md b/doc/build-windows.md index 1ac34c0189..6d2901c424 100644 --- a/doc/build-windows.md +++ b/doc/build-windows.md @@ -39,9 +39,26 @@ The first step is to install the mingw-w64 cross-compilation tool chain: sudo apt-get install g++-mingw-w64-x86-64 mingw-w64-x86-64-dev -Ubuntu Focal 20.04 [1](#footnote1): +Next, set the default `mingw32 g++` compiler option to POSIX[1](#footnote1): - sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix. +``` +sudo update-alternatives --config x86_64-w64-mingw32-g++ +``` + +After running the above command, you should see output similar to that below. +Choose the option that ends with `posix`. + +``` +There are 2 choices for the alternative x86_64-w64-mingw32-g++ (providing /usr/bin/x86_64-w64-mingw32-g++). + + Selection Path Priority Status +------------------------------------------------------------ + 0 /usr/bin/x86_64-w64-mingw32-g++-win32 60 auto mode +* 1 /usr/bin/x86_64-w64-mingw32-g++-posix 30 manual mode + 2 /usr/bin/x86_64-w64-mingw32-g++-win32 60 manual mode + +Press to keep the current choice[*], or type selection number: +``` Once the toolchain is installed the build steps are common: