Windows

You can download the official binaries for Windows.
If you want to change the file icon or description, use tools like Resource Hacker without compiling.

You have two main options for building the miner from source: MSYS2 (x64/ARM64) or Microsoft Visual Studio (x64).

Preparation

CMake

Download and install the latest CMake release, during the installation select one of the following options: Add CMake to the system PATH for all users or Add CMake to the system PATH for the current user.

Dependencies
  1. Download the most recent version of prebuilt dependencies by using the green Code button and Download ZIP
  2. Extract all files to c:\xmrig-deps

Final directory structure should looks like:

C:\xmrig-deps
├───clang
│   └───arm64
│       ├───include
│       └───lib
├───gcc
│   └───x64
│       ├───include
│       └───lib
└───msvc2022
    └───x64
        ├───include
        └───lib

MSYS2 MSYS2

Follow the instructions on msys2.org to install and update MSYS2.

To build for x64, open the ucrt64.exe shell and execute the following commands:

1. pacman -S mingw-w64-ucrt-x86_64-gcc git make
2. git clone https://github.com/xmrig/xmrig.git
3. mkdir xmrig/build && cd xmrig/build
4. "c:\Program Files\CMake\bin\cmake.exe" .. -G "Unix Makefiles" -DXMRIG_DEPS=c:/xmrig-deps/gcc/x64
5. make -j$(nproc)

To build for ARM64, open the clangarm64.exe shell and execute the following commands:

1. pacman -S mingw-w64-clang-aarch64-clang git make
2. git clone https://github.com/xmrig/xmrig.git
3. mkdir xmrig/build && cd xmrig/build
4. "c:\Program Files\CMake\bin\cmake.exe" .. -G "Unix Makefiles" -DXMRIG_DEPS=c:/xmrig-deps/clang/arm64
5. make -j$(nproc)

Microsoft Visual Studio Microsoft Visual Studio

Download and install Git . The default setup parameters are fine.

Download and install Visual Studio Community 2022 , during install choose following components: Desktop development with C++ (left side) and C++/CLI support for v143 build tools (right side).

1. git clone https://github.com/xmrig/xmrig.git
2. mkdir xmrig\build && cd xmrig\build
3. cmake .. -G "Visual Studio 17 2022" -A x64 -DXMRIG_DEPS=c:\xmrig-deps\msvc2022\x64
4. cmake --build . --config Release
Microsoft Visual Studio 2019 support is deprecated and will be removed in future.

Download and install Visual Studio Community 2019 , during install choose following components: Desktop development with C++ (left side) and C++/CLI support for v142 build tools (right side).

1. git clone https://github.com/xmrig/xmrig.git
2. mkdir xmrig\build && cd xmrig\build
3. cmake .. -G "Visual Studio 16 2019" -A x64 -DXMRIG_DEPS=c:\xmrig-deps\msvc2019\x64
4. cmake --build . --config Release
Microsoft Visual Studio 2017 support is deprecated and will be removed in future.

Download and install Visual Studio Community 2017 , during install choose following components: Desktop development with C++ (left side) and C++/CLI support (right side).

1. git clone https://github.com/xmrig/xmrig.git
2. mkdir xmrig\build && cd xmrig\build
3. cmake .. -G "Visual Studio 15 2017 Win64" -DXMRIG_DEPS=c:\xmrig-deps\msvc2017\x64
4. cmake --build . --config Release

CUDA CUDA

CUDA plugin is optional and only required if you like to use NVIDIA GPUs.

We provide binary downloads for the CUDA plugin, built with CUDA 10.2 to 12+. However, if you prefer to build the plugin on your own, you can use Microsoft Visual Studio.

Follow instructions on https://developer.nvidia.com/cuda-downloads to install CUDA.

1. git clone https://github.com/xmrig/xmrig-cuda.git
2. mkdir xmrig-cuda\build && cd xmrig-cuda\build
3. cmake .. -G "Visual Studio 17 2022" -A x64 -DCUDA_TOOLKIT_ROOT_DIR="c:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.9"
4. cmake --build . --config Release

Last updated 5 months ago