Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 714 Bytes

win-cross-compile.md

File metadata and controls

26 lines (18 loc) · 714 Bytes

Windows Cross Compile

Build Bitcoin Core binaries for Windows on macOS.

Setup

Need the mingw-w64 toolchain and NSIS (for building the installer).

brew install mingw-w64 makensis

Build

# Qt cross-compilation doesn't work
make -C depends/ HOST=x86_64-w64-mingw32 NO_QT=1 -j$(nproc)

cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake

cmake --build build -j$(nproc)

file build/bin/bitcoind.exe
build/bin/bitcoind.exe: PE32+ executable (console) x86-64, for MS Windows

Take build/bin/bitcoind.exe into a Windows VM and run.

Mouting src/ as a Shared Folder is an easy way to do this.