Skip to content

Commit 638806b

Browse files
committed
merge bitcoin#22088: improve note on choosing posix mingw32
1 parent 7ad0141 commit 638806b

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

doc/build-windows.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,26 @@ The first step is to install the mingw-w64 cross-compilation tool chain:
3939

4040
sudo apt-get install g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
4141

42-
Ubuntu Focal 20.04 <sup>[1](#footnote1)</sup>:
42+
Next, set the default `mingw32 g++` compiler option to POSIX<sup>[1](#footnote1)</sup>:
4343

44-
sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.
44+
```
45+
sudo update-alternatives --config x86_64-w64-mingw32-g++
46+
```
47+
48+
After running the above command, you should see output similar to that below.
49+
Choose the option that ends with `posix`.
50+
51+
```
52+
There are 2 choices for the alternative x86_64-w64-mingw32-g++ (providing /usr/bin/x86_64-w64-mingw32-g++).
53+
54+
Selection Path Priority Status
55+
------------------------------------------------------------
56+
0 /usr/bin/x86_64-w64-mingw32-g++-win32 60 auto mode
57+
* 1 /usr/bin/x86_64-w64-mingw32-g++-posix 30 manual mode
58+
2 /usr/bin/x86_64-w64-mingw32-g++-win32 60 manual mode
59+
60+
Press <enter> to keep the current choice[*], or type selection number:
61+
```
4562

4663
Once the toolchain is installed the build steps are common:
4764

0 commit comments

Comments
 (0)