Skip to content

MSYS2 and MinGW

MSYS2 provides the MinGW Windows lane behind the windows-x64 presets. The selected MSYS2 subsystem, compiler architecture, package set, and shell must agree; mixing MSYS and MinGW libraries produces misleading configure or runtime failures.

Contract route

Open a matching MinGW64 environment and inspect the repository presets:

cmake --list-presets
cmake --preset windows-x64
cmake --build --preset windows-x64

Use windows-tiles-sounds-x64 for the tiles+sound surface. Both are multi-configuration Ninja presets with RelWithDebInfo build presets; do not invent a build directory or configuration that silently differs from the preset.

Dependencies and shell boundary

doc/c++/COMPILING-MSYS.md describes the ecosystem, while CMakePresets.json, CMake configure errors, and current CI decide the actual contract. Install dependencies for the selected MinGW architecture. Run MinGW executables from the matching shell and inspect the packaged DLL set outside the development PATH.

Validation

  • Configure and build the exact preset.
  • Run the produced tests for the same configuration.
  • For tiles/sound, start from a clean shell and verify renderer, fonts, sound, translations, and shader artifacts where SDL3 is enabled.
  • Record shell (MINGW64), compiler/version, preset, and configuration in the PR.

Common failures

Wrong-architecture packages, an MSYS compiler before MinGW on PATH, stale CMake cache, missing runtime DLLs, and mixed slash/drive paths are distinct failures. Preserve the first configure/link error and avoid “fixing” it by copying arbitrary DLLs into the source tree.