Skip to content

Build for Windows with MSVC Build Tools

Oznogon edited this page Jun 23, 2026 · 1 revision

Tested as of 23 June 2026 on Windows 11 x86 64-bit with Visual Studio Build Tools 2026

Microsoft C++ (MSVC) is not a supported build tool for EmptyEpsilon. To build EmptyEpsilon for Windows, the supported methods are cross-compilation in Build for Windows on Linux or Build for Windows on WSL.

See Build for Windows with MSVC for a GUI build option.

As an alternative to Build for Windows with MSVC, you can also build EmptyEpsilon using Microsoft's Build Tools for Visual Studio. This installs only the compiler and libraries and allows you to build EmptyEpsilon entirely from the Windows command line.

Initial configuration

  1. Download and install Git for Windows (winget install Git.Git or winget install Microsoft.Git).

  2. Download and install Ninja for Windows (winget install Ninja-build.Ninja).

  3. Optional: Download and install Windows Terminal (winget install Microsoft.WindowsTerminal).

  4. Download and install Build Tools for Visual Studio (winget install Microsoft.VisualStudio.BuildTools).

    This installs the Visual Studio Installer.

  5. Open the Visual Studio Installer, click Modify in Visual Studio Build Tools 2026, and check Desktop development with C++.

  6. In the "Installation details" sidebar, make sure that at least these optional items are checked (they should be by default):

    • MSVC Build Tools for x64/x86 (Latest)
    • Windows 11 SDK
    • C++ CMake tools for Windows
  7. Optional: Also check C++ Tools for Linux and Mac Development.

  8. Click Install to download and install the tools.

    This installs several Developer Command Prompt for Visual Studio shortcuts to open a command-line development environment for various architectures and cross-compilation scenarios. If you installed Windows Terminal, this also adds a "Developer PowerShell for VS" profile that automatically includes the necessary development environment.

  9. Clone the EmptyEpsilon and SeriousProton repositories, preferably as siblings under the same parent directory.

  10. Download and unzip the SDL2 VC development libraries.

Set up the build environment

  1. From the command line, go to the EmptyEpsilon repository's directory.

  2. Create and enter a build directory:

    mkdir _build
    cd _build
  3. Run cmake to configure the build:

    cmake .. -G Ninja -DSDL2_DIR="C:/Users/you/source/repos/SDL2-2.32.10/cmake"

    where:

    • C:/Users/you/source/repos/SDL2-2.32.10/ is the path to where you extracted the SDL2 VC development libraries

    Optionally include other build settings as described in Build, such as:

    • -DSERIOUS_PROTON_DIR=../../SeriousProton, where ../../SeriousProton is the path to the SP repository if CMake is unable to locate it
    • -DCMAKE_BUILD_TYPE=RelWithDebInfo for a build you intend to distribute, or -DCMAKE_BUILD_TYPE=Debug for a debug build
  4. Run ninja EmptyEpsilon to build EmptyEpsilon.

    If successful, this produces an EmptyEpsilon.exe executable.

Run the build

To run the build against the repository's scripts and resources, you can copy it and the required SDL2.dll to the EmptyEpsilon repository's root directory and run it from there.

Prerequisite

Copy the SDL2.dll library for your architecture (x86, x64, etc.) from the SDL2 development libraries to the EmptyEpsilon repository root.

For example, the x64 SDL2.dll library is located in SDL2-2.32.10\lib\x64 of the SDL2 2.32.10 VC development libraries ZIP archive. Copy this to the EmptyEpsilon repository root alongside EmptyEpsilon.exe.

Each build

  1. Copy the EmptyEpsilon executable to the repository root.

    For example, from the _build directory, run:

    copy EmptyEpsilon.exe ..
    cd ..
  2. Run EmptyEpsilon.exe from the EmptyEpsilon repository root.

To package EmptyEpsilon into a ZIP file with the required libraries, scripts, and resources, run ninja package from the _build directory.

Troubleshooting

To specify a compiler version or location, use these flags in your cmake command:

-DCMAKE_C_COMPILER="C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\VC\Tools\MSVC\14.50.35717\bin\Hostx64\x64\cl.exe" `
-DCMAKE_CXX_COMPILER="C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\VC\Tools\MSVC\14.50.35717\bin\Hostx64\x64\cl.exe" `

Clone this wiki locally