Before building Electronero on Windows, install the following:
MSYS2 MinGW 64-bit from the Start Menu.pacman -SyuIf prompted to close the window, restart
MSYS2 MinGW 64-bit and run:
pacman -Su
💡 Always use the "MSYS2 MinGW 64-bit" terminal to build Electronero — not the default MSYS2 shell.
pacman -S git mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake \
mingw-w64-x86_64-boost mingw-w64-x86_64-zmq \
mingw-w64-x86_64-qt5-base mingw-w64-x86_64-protobuf \
mingw-w64-x86_64-openssl mingw-w64-x86_64-libbacktrace
Run all commands in MSYS2 MinGW 64-bit terminal.
git clone --recursive https://github.com/electronero-project/electronero.git
cd electronero
# If you forgot --recursive:
git submodule init && git submodule update
Create a build directory and compile Electronero:
mkdir build
cd build
cmake .. \
-DBOOST_ROOT=C://msys64/mingw64/ \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBoost_USE_STATIC_LIBS=ON \
-DBoost_USE_MULTITHREADED=ON \
-DBoost_COMPILER=-mgw11 \
-DBoost_ARCHITECTURE=-x64 \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DOPENSSL_ROOT_DIR=$HOME/local/openssl-1.1 \
-DOPENSSL_INCLUDE_DIR=$HOME/local/openssl-1.1/include \
-DOPENSSL_LIBRARIES=$HOME/local/openssl-1.1/lib \
-DCMAKE_PREFIX_PATH=$HOME/local/openssl-1.1 \
-DSTATIC=ON
make -j$(nproc)
After compiling, you'll find electronerod.exe in build/bin.