Skip to content

Commit dafab2b

Browse files
committed
doc: improve note on choosing posix mingw32
1 parent 5c041cb commit dafab2b

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
@@ -81,9 +81,26 @@ The first step is to install the mingw-w64 cross-compilation tool chain:
8181

8282
sudo apt install g++-mingw-w64-x86-64
8383

84-
Ubuntu Bionic 18.04 <sup>[1](#footnote1)</sup>:
84+
Next, set the default `mingw32 g++` compiler option to POSIX<sup>[1](#footnote1)</sup>:
8585

86-
sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.
86+
```
87+
sudo update-alternatives --config x86_64-w64-mingw32-g++
88+
```
89+
90+
After running the above command, you should see output similar to that below.
91+
Choose the option that ends with `posix`.
92+
93+
```
94+
There are 2 choices for the alternative x86_64-w64-mingw32-g++ (providing /usr/bin/x86_64-w64-mingw32-g++).
95+
96+
Selection Path Priority Status
97+
------------------------------------------------------------
98+
0 /usr/bin/x86_64-w64-mingw32-g++-win32 60 auto mode
99+
* 1 /usr/bin/x86_64-w64-mingw32-g++-posix 30 manual mode
100+
2 /usr/bin/x86_64-w64-mingw32-g++-win32 60 manual mode
101+
102+
Press <enter> to keep the current choice[*], or type selection number:
103+
```
87104

88105
Once the toolchain is installed the build steps are common:
89106

0 commit comments

Comments
 (0)