- Visual Studio 2017 or later with the Desktop development with C++ workload (includes MFC)
- CMake 3.15 or later
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A Win32
cmake --build . --config DebugAdjust the -G generator string to match your Visual Studio version:
| Visual Studio Version | Generator String |
|---|---|
| 2017 | Visual Studio 15 2017 |
| 2019 | Visual Studio 16 2019 |
| 2022 | Visual Studio 17 2022 |
Use an x86 Developer Command Prompt or run vcvarsall.bat x86 to set up the 32-bit MSVC environment first:
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build .For a release build (either generator):
# Visual Studio generator (multi-config)
cmake --build . --config Release
# Ninja (single-config — reconfigure with Release)
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build .Note: MFC static linking and the MultiByte character set are configured automatically by CMake.
