System Requirements
Before building Marlin, ensure your system meets these requirements:- C++17 compiler (GCC 7+, Clang 5+, MSVC 2017+, or equivalent)
- CMake 3.16 or higher
- Git (to clone the repository)
On Windows, you’ll need MinGW Makefiles as the CMake generator. The build configuration specifically uses MinGW for compatibility.
Building from Source
Generate build files
Use CMake to generate the build configuration. The project uses MinGW Makefiles on Windows:Platform-specific notes:This creates a
- Windows (MinGW)
- Linux / macOS
build/ directory with all necessary build files.Build the executable
Compile the project using CMake’s build command:This compiles all source files and produces the
marlin executable in the build/ directory.Build Configuration
Marlin’sCMakeLists.txt is configured with the following settings:
- C++ Standard: C++17 (required)
- Compiler Warnings: Enabled for code quality
- MSVC:
/W4 - GCC/Clang:
-Wall -Wextra -pedantic
- MSVC:
- Project Version: 0.1.0
Project Structure
The build system compiles these components: Main executable (marlin):
src/main.cpp- CLI interfacesrc/position.cpp- Bitboard position representationsrc/solver.cpp- Negamax solver with alpha-beta pruningsrc/transposition.cpp- Transposition table implementation
marlin_tests):
tests/test_position.cpp- Unit tests for position logicsrc/position.cpp- Position implementation
Running Tests
To run the test suite:Troubleshooting
CMake version error
CMake version error
Error:
CMake 3.16 or higher is requiredSolution: Upgrade CMake:C++17 not supported
C++17 not supported
Error:
unsupported option '-std=c++17'Solution: Update your compiler:- GCC: Version 7 or higher
- Clang: Version 5 or higher
- MSVC: Visual Studio 2017 or higher
MinGW not found (Windows)
MinGW not found (Windows)
Error:
Generator 'MinGW Makefiles' not foundSolution: Install MinGW-w64:- Download from mingw-w64.org
- Add MinGW’s
bin/directory to your PATH - Verify with
g++ --version
Next Steps
Now that Marlin is installed, learn how to use it:Quick Start Guide
Run your first Connect 4 analysis