Skip to content

Commit 0306978

Browse files
committed
Merge #8935: Documentation: Building on Windows with WSL
7c1716f Documentation for Building on Windows with WSL (poole_party)
2 parents f628d9a + 7c1716f commit 0306978

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

doc/build-windows.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,45 @@
11
WINDOWS BUILD NOTES
22
====================
33

4-
Some notes on how to build Bitcoin Core for Windows.
4+
Below are some notes on how to build Bitcoin Core for Windows.
55

66
Most developers use cross-compilation from Ubuntu to build executables for
77
Windows. This is also used to build the release binaries.
88

9-
Building on Windows itself is possible (for example using msys / mingw-w64),
10-
but no one documented the steps to do this. If you are doing this, please contribute them.
9+
While there are potentially a number of ways to build on Windows (for example using msys / mingw-w64),
10+
using the Windows Subsystem For Linux is the most straight forward. If you are building with
11+
an alternative method, please contribute the instructions here for others who are running versions
12+
of Windows that are not compatible with the Windows Subsystem for Linux.
13+
14+
Compiling with the Windows Subsystem For Linux
15+
-------------------
16+
17+
With Windows 10, Microsoft has released a new feature named the
18+
[Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about). This feature allows you to run a bash shell directly on Windows in an Ubuntu based
19+
environment. Within this environment you can cross compile for Windows without the need for a separate Linux VM or Server.
20+
21+
This feature is not supported in versions of Windows prior to Windows 10 or on Windows Server SKUs.
22+
23+
To get the bash shell, you must first activate the feature in Windows.
24+
25+
1. Turn on Developer Mode
26+
* Open Settings -> Update and Security -> For developers
27+
* Select the Developer Mode radio button
28+
* Restart if necessary
29+
2. Enable the Windows Subsystem for Linux feature
30+
* From Start, search for "Turn Windows features on or off" (type 'turn')
31+
* Select Windows Subsystem for Linux (beta)
32+
* Click OK
33+
* Restart if necessary
34+
3. Complete Installation
35+
* Open a cmd prompt and type "bash"
36+
* Accept the license
37+
* Create a new UNIX user account (this is a separate account from your Windows account)
38+
39+
After the bash shell is active, you can follow the instructions below for Windows 64-bit Cross-compilation.
40+
When building dependencies within the 'depends' folder, you may encounter an error building
41+
the protobuf dependency. If this occurs, re-run the command with sudo. This is likely
42+
a bug with the Windows Subsystem for Linux feature and may be fixed with a future update.
1143

1244
Cross-compilation
1345
-------------------
@@ -41,4 +73,3 @@ To build executables for Windows 64-bit:
4173
make
4274

4375
For further documentation on the depends system see [README.md](../depends/README.md) in the depends directory.
44-

0 commit comments

Comments
 (0)