Skip to content

Windows Build

xmrig edited this page Jul 23, 2018 · 7 revisions
  • If you just want change file icon or description don't need to compile, you can use tools like Resource Hacker.

Install Dependencies

Visual Studio 2017 Community

CUDA 9.2+

  • download and install https://developer.nvidia.com/cuda-downloads
  • for minimal install choose Custom installation options during the install and select
    • CUDA/Develpment
    • CUDA/Runtime
    • Driver components (Only if NVIDIA GPU installed)

CMake for Win64

  • download and install the latest version from https://cmake.org/download/
  • tested version: 3.12.0
  • during the install choose the option Add CMake to the system PATH for all users

Microhttpd and libuv

Compile

  • Download and unzip xmrig-nvidia.zip
  • Open a command line cmd
  • cd to your unzipped source code directory
  • Execute the following commands:
mkdir build
cd build
cmake .. -G "Visual Studio 15 2017 Win64" -DXMRIG_DEPS=c:\xmrig-deps\msvc2017\x64

It will create Visual Studio Solution file xmrig-nvidia.sln.

  • ⚠️ Don't forget change Debug to Release build.
  • ⚠️ Depends of you MSVC 2017 version you may require change host_config.h in your CUDA installation.

Edit host_config.h

Open file C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\crt\host_config.h and change line 131 to:

#if _MSC_VER < 1600 || _MSC_VER > 1999

Additional CMake options

  • -DWITH_AEON=OFF Disable CryptoNight-Lite support.
  • -DWITH_HTTPD=OFF Build without built in http server and API.