This tutorial is based on Swordlet’s Github documentation (https://github.com/XDagger/xmrig2xdag/blob/main/README.md) with some explanations & details for beginners.
Validate on : Windows 11 21H2.
1°/ Install and update MSYS2 environment
- Download installation program at https://www.msys2.org/
- 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) :
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
Then enter :
cd
git clone https://github.com/XDagger/xmrig2xdag.git
Same as above, AV program can rise up :
As you can see, we retreive xmrig2xdag sources :
3°/ Install MSYS missing packages
Let’s install ‘cmake’ & ‘make’ packages :
pacman -S make cmake
Now let’s install go language :
pacman -S mingw-w64-x86_64-go
Setup some vars :
export GOROOT=/mingw64/lib/go
export GOPATH=/mingw64
4°/ Build something in /clib
Now enter :
cd xmrig2xdag/clib
cmake .
And then you’ll get this :
So write :
make
And you’ll get :
Let’s see what we generate :
ls -l
We have to rename file you obtain :
mv libxdag_crypto_MINGW64_NT-*.a libxdag_crypto_Windows.a
The end of file name could change. It’s depend of your Windows release. By example for Windows 11, could finish by ‘NT-10.0–22000.a’ . It’s not a matter !
So now you should obtain this :
5°/ Final build
cd ../server
go mod tidy
CGO_ENABLED=1 go build
So I’ll get :
Let’s verify what we get :
ls -l
6°/ Proof Of Work
Copy your usual config.json file, already set with settings pool.
Example of content (edit with VSCODE) :
Now launch it, and then XMRIG miner.
And ‘Hocus-pocus’ you should get this :
BRAVO ! You did it !!!
Many many thanks to :
- Swordlet (https://github.com/swordlet)