Tutorial “from stratch” for compiling XMRIG fork with embedded rx/XDAG algo for Windows.
1°/ Install and update MSYS2 environment
- Download installation program at https://www.msys2.org/
- Run installation (follow guide as written on msys2’s website)
When this window appear, you’re ready to go :
Now install gcc (GNU Compiler Collection) :
pacman -S mingw-w64-x86_64-gcc
Note : Follow upgrade process on https://www.msys2.org/docs/updating/ .
In details:
pacman -Suy
After closing, repeat again :
pacman -Suy
In some case, AV program can rise up :
2°/ Cloning from GitHub
We need to install ‘git’ for msys2 :
pacman -S git
cd
git clone --branch xdag https://github.com/swordlet/xmrig.git
Same as above, AV program can rise up :
As you can see, we retreive XMRIG’s sources :
Optional :
If you want building ‘0 fee’ release, you should edit (with VSCODE by example)/xmrig/src/donate.h
and modify lines 40 & 41 like this :
Note : Real path of donate.h is C:\msys64\home\<user>\xmrig\src\
.
4°/ 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.
5°/ 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 andDownload ZIP
- Extract
gcc
folders toc:\xmrig-deps
6°/ Build something
Back to MSYS :
cd
mkdir xmrig/build && cd xmrig/scripts
"c:\Program Files\CMake\bin\cmake.exe" .. -G "Unix Makefiles" -DXMRIG_DEPS=c:/xmrig-deps/gcc/x64
And then you’ll get this result :
7°/ 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.exe’ has been created !
8°/ Proof Of Work
Copy ‘xmrig.exe’ + WinRing0x64.sys + your usual config.json file (already containing your wallet address & goods settings pool) in a same new folder, and run ‘xmrig.exe’. Don’t forget launch proxy before you need it.
‘Hocus-pocus’ you should get this :
This is XMRIG for XDAG compile with gcc instead of original release available on github who is compile with MSVC.
For going forward :
Check this out : https://xmrig.com/docs/miner/build/windows