Files
mines/rin/miner/build-windows.md
Dobromir Popov 029389aa57 wip
2025-10-01 13:41:55 +03:00

1.8 KiB

Building cpuminer-opt-rinhash on Windows

Prerequisites

  1. Install MSYS2 from https://www.msys2.org/
  2. Open MSYS2 terminal and install build dependencies:
# Update package database
pacman -Syu

# Install build tools and dependencies
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-curl mingw-w64-x86_64-jansson mingw-w64-x86_64-openssl mingw-w64-x86_64-gmp mingw-w64-x86_64-zlib mingw-w64-x86_64-autotools mingw-w64-x86_64-pkg-config

C:\msys64\msys2_shell.cmd -defterm -here -no-start -mingw64 -c "pacman -S gcc autotools libcurl-devel mingw-w64-x86_64-curl gmp-devel jansson-devel zlib-devel" C:\msys64\msys2_shell.cmd -defterm -here -no-start -mingw64 -c "cd /f/projects/mines/rin/miner/cpuminer/cpuminer-opt-rin && ./configure --with-curl=/mingw64 --host=x86_64-w64-mingw32" C:\msys64\msys2_shell.cmd -defterm -here -no-start -mingw64 -c "cd /f/projects/mines/rin/miner/cpuminer/cpuminer-opt-rin && make -j8"

C:\msys64\msys2_shell.cmd -defterm -here -no-start -mingw64 -c "cd /f/projects/mines/rin/miner/cpuminer/cpuminer-opt-rin && ./configure --with-curl=/mingw64 --host=x86_64-w64-mingw32"

./cpuminer-rinhash.exe -a rinhash -o stratum+tcp://192.168.0.188:3333 -u username.workername -p x -t 4

Build Process

  1. Open MSYS2 MinGW 64-bit terminal (not the regular MSYS2 terminal)
  2. Navigate to the cpuminer directory
  3. Run the build commands:
cd /f/projects/mines/rin/miner/cpuminer
./autogen.sh
./configure CFLAGS="-O3 -march=native -funroll-loops -fomit-frame-pointer"
make -j$(nproc)

Alternative: Use Pre-built Binary

Since the repository already contains Windows DLLs and object files, you might be able to complete the build with just the linking step.

Test the Miner

Once built, test with:

./cpuminer.exe -a rinhash -o stratum+tcp://your-pool:port -u your-username -p x -t 4