Compile ‘x4x’ miner on Windows

FSOL
4 min readApr 10, 2023

--

Tutorial “from stratch” for compiling XMRig-4-XDAG (aka x4x) for Windows. We consider that you start with a freshly installed Windows 10 version 2022H2.

1°/ Install and update MSYS2 environment

  • Run installation (follow guide as written on msys2’s website)
Select default path for install

When this window appear, you’re ready to go :

Now install gcc (GNU Compiler Collection) & make utility :

pacman -S mingw-w64-x86_64-gcc make

Note : Follow upgrade process on https://www.msys2.org/docs/updating/ .

In details:

pacman -Suy

Press ENTER. Then after closing, repeat again :

pacman -Suy

Press ENTER and wait for the update process ending.

In some case, AV program can rise up :

Create an exception if necessary to complete install

2°/ Cloning from GitHub

We need to install ‘git’ for msys2 :

pacman -S git

Press ENTER and wait for the update process ending.

Then type this command :

git clone https://github.com/FSOL-XDAG/xmrig-4-xdag.git

Same as above, AV program can rise up :

Create an exception if necessary

As you can see, we retrieve x4x’s sources :

3°/ Install CMAKE for Windows

Download and install latest CMake release : https://cmake.org/download/

During install choose option Add CMake to the system PATH for all users or Add CMake to the system PATH for the current user. For all other choices, select items by default.

4°/ Now install XMRIG dependencies.

Nexts steps come from https://xmrig.com/docs/miner/build/windows :

  • Create folder c:\xmrig-deps
  • Download the most recent version of prebuilt dependencies by using the green Code button and Download ZIP
  • Extract gcc folders to c:\xmrig-deps

5°/ Build something

Back to MSYS :

cd
mkdir xmrig-4-xdag/build && cd xmrig-4-xdag/build
"c:\Program Files\CMake\bin\cmake.exe" .. -G "Unix Makefiles" -DXMRIG_DEPS=c:/xmrig-deps/gcc/x64

And then you’ll get this result :

6°/ Build program

The end is near. Type this :

make -j$(nproc)

You’ll get this as result :

As you can see with ls -l , a file called xmrig-4-xdag.exe has been created :

7°/ Proof Of Work

Copy xmrig-4-xdag.exe + WinRing0x64.sys + your usual config.json file (already containing your wallet address & goods settings pool) in a same new folder, and run xmrig-4-xdag.exe. Don’t forget launch proxy before (if you need it).

Hocus-pocus’ you should get this :

This is ‘x4x’ compile compile by yourself, running on your PC Windows.

For going forward :

Check this out : https://xmrig.com/docs/miner/build/windows

If you enjoy this article, don’t forget to give me a tip by sending me some XDAG : 53r2nH7y81CePxqe73mpoZdEjs66j178K

--

--