@@ -4,10 +4,11 @@ WINDOWS BUILD NOTES
4
4
Below are some notes on how to build Bitcoin Core for Windows.
5
5
6
6
Most developers use cross-compilation from Ubuntu to build executables for
7
- Windows. This is also used to build the release binaries.
7
+ Windows. Cross-compilation is also used to build the release binaries.
8
8
9
- Currently only building on Ubuntu Trusty 14.04 is supported.
10
- Other versions are unsupported or known to be broken (e.g. Ubuntu Xenial 16.04).
9
+ Currently only building on Ubuntu Trusty 14.04 or Ubuntu Zesty 17.04 or later is supported.
10
+ Building on Ubuntu Xenial 16.04 is known to be broken, see extensive discussion in issue [ 8732] ( https://github.com/bitcoin/bitcoin/issues/8732 ) .
11
+ While it may be possible to do so with work arounds, it's potentially dangerous and not recommended.
11
12
12
13
While there are potentially a number of ways to build on Windows (for example using msys / mingw-w64),
13
14
using the Windows Subsystem For Linux is the most straightforward. If you are building with
@@ -64,6 +65,13 @@ build process.
64
65
65
66
See also: [ dependencies.md] ( dependencies.md ) .
66
67
68
+ If you're building on Ubuntu 17.04 or later, run these two commands, selecting the 'posix' variant for both,
69
+ to work around issues with mingw-w64. See issue [ 8732] ( https://github.com/bitcoin/bitcoin/issues/8732 ) for more information.
70
+ ```
71
+ sudo update-alternatives --config x86_64-w64-mingw32-g++
72
+ sudo update-alternatives --config x86_64-w64-mingw32-gcc
73
+ ```
74
+
67
75
## Building for 64-bit Windows
68
76
69
77
To build executables for Windows 64-bit, install the following dependencies:
@@ -72,6 +80,7 @@ To build executables for Windows 64-bit, install the following dependencies:
72
80
73
81
Then build using:
74
82
83
+ PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') # strip out problematic Windows %PATH% imported var
75
84
cd depends
76
85
make HOST=x86_64-w64-mingw32
77
86
cd ..
@@ -83,10 +92,11 @@ Then build using:
83
92
84
93
To build executables for Windows 32-bit, install the following dependencies:
85
94
86
- sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev
95
+ sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev
87
96
88
97
Then build using:
89
98
99
+ PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') # strip out problematic Windows %PATH% imported var
90
100
cd depends
91
101
make HOST=i686-w64-mingw32
92
102
cd ..
0 commit comments