Compile Obsidian
A Step-by-Step Guide for Non-Programmers
Introduction
The Obsidian chess engine is a powerful open-source tool for chess analysis. This guide walks you through compiling Obsidian on Windows using Mingw64—no programming knowledge needed! Follow these steps to transform Obsidian’s source code into a ready-to-use .exe
file.
Prerequisites
- Windows PC (64-bit recommended).
- Internet connection (to download tools and source code).
Step 1: Install Required Tools
Git
- Why needed: Downloads Obsidian’s source code.
- How to install:
- Visit Git for Windows.
- Click “Download” and run the installer.
- Accept all default settings.
Mingw64
- Why needed: Compiles C code into a Windows executable.
- How to install:
- Download the Mingw-w64 installer.
- Pick the latest version (e.g.,
x86_64-13.2.0-release-win32-seh-msvcrt-rt_v11-rev1.7z
). - Extract the
.7z
file toC:\mingw64
. - Add Mingw64 to your system PATH:
- Press
Win + S
→ typeEnvironment Variables
→ select “Edit the system environment variables”. - Click Environment Variables → Under “System variables”, select Path → Click Edit.
- Add
C:\mingw64\bin
→ Click OK.
- Press
Verify Installation
- Open Command Prompt (press
Win + R
→ typecmd
). - Run:
“`bash
gcc –version
If you see version details (e.g., `gcc (GCC) 13.2.0`), Mingw64 is installed correctly.
---
#### **Step 2: Download Obsidian’s Source Code**
1. Open **Command Prompt**.
2. Run:
bash
git clone https://github.com/gab8192/Obsidian
This creates a folder `Obsidian` with all source files.
3. Navigate into the folder:
bash
cd Obsidian
---
#### **Step 3: Compile the Chess Engine**
1. In the same Command Prompt, run:
bash
gcc -o obsidian.exe bitboard.c board.c main.c movegen.c perft.c search.c uci.c util.c -O3 -flto
- **What this does**: Combines all Obsidian’s `.c` files into `obsidian.exe`.
- **Flags explained**:
- `-O3`: Optimises for speed.
- `-flto`: Enhances performance further.
2. Wait 10-30 seconds. If successful, you’ll see **no error messages**.
---
#### **Step 4: Test the Executable**
1. Run the compiled engine:
bash
obsidian.exe
2. **Expected output**:
Obsidian v0.1 by gab8192
uciok`` Type
quit` to exit.

Troubleshooting
- “gcc not recognised”:
- Recheck Mingw64’s
bin
folder path in Environment Variables. - Compilation errors:
- Ensure you ran
gcc
inside theObsidian
folder. - Update Mingw64/Git and retry.
Using Obsidian in Chess GUIs
- Install a UCI-compatible GUI (e.g., Arena Chess).
- Add
obsidian.exe
as a new engine in the GUI settings.
Conclusion
You’ve successfully compiled the Obsidian chess engine on Windows using Mingw64! This process unlocks advanced chess analysis without expensive software. For updates, revisit Obsidian’s GitHub repository.
Pro Tip: Replace
-O3
with-O2
in thegcc
command if you encounter stability issues.
Keywords: Compile Obsidian chess engine, Mingw64 Windows, Obsidian chess tutorial, build chess engine, open-source chess, UCI engine, Windows chess programming.

Jorge Ruiz Centelles
Filólogo y amante de la antropología social africana