Skip to content
Shawn Lee edited this page May 2, 2018 · 1 revision

There two options Microsoft Visual Studio 2015/2017 or MSYS2 both required libuv build and cmake.

MSYS2 64 bit

Use mingw64.exe shell. Necessary MSYS2 packages:

pacman -Sy
pacman -S mingw-w64-x86_64-gcc
pacman -S make
pacman -S mingw-w64-x86_64-cmake
pacman -S mingw-w64-x86_64-pkg-config

CMake build:

mkdir build
cd build
cmake .. -G "Unix Makefiles" -DXMRIG_DEPS=c:/xmrig-deps/gcc/x64
make

MSYS2 32 bit

Use mingw32.exe shell. Necessary MSYS2 packages:

pacman -Sy
pacman -S mingw-w64-i686-gcc
pacman -S make
pacman -S mingw-w64-i686-cmake
pacman -S mingw-w64-i686-pkg-config

CMake build:

mkdir build
cd build
cmake .. -G "Unix Makefiles" -DXMRIG_DEPS=c:/xmrig-deps/gcc/x86
make

Microsoft Visual Studio 2017

Go to directory with source, then:

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.sln. Don't forget change Debug to Release build.

Additional CMake options

  • -DWITH_LIBCPUID=OFF Disable libcpuid. Auto configuration of CPU after this will be very limited.
  • -DWITH_AEON=OFF Disable CryptoNight-Lite support.
  • -DWITH_HTTPD=OFF Build without built in http server and API.
Clone this wiki locally