Skip to content

Install the tools

Labrador builds on Windows, with the Microsoft C++ compiler. Everything the Windows build needs comes with one install, Visual Studio. Git is a second, needed only if you take the Git route or later put your project in Git; the starter project does not need it. The browser build needs Emscripten, and Python 3 to install it with, but not Git; Build for the browser covers both when you get there, and nothing in Get Started needs them.

Every command these pages ask you to run is in a box like the one below. Nothing in a box needs changing unless the text around it says so, and then the part to change is named.

Terminal window
echo This is a command.

To run one, point at the box and click the copy button that appears at its top right, click in the command prompt window, paste with Ctrl+V or a right-click, and press Enter. A box with several lines can be pasted all at once: each line runs in turn. If the last line is still sitting after the prompt when the others have finished, press Enter once more. Boxes labelled as output are what you should see, not something to type.

On Windows 11 the command prompt usually opens in Windows Terminal, a window with tabs along its top. Pasting more than one line there first asks whether you really want to: a box says You are about to paste text that contains multiple lines. Click Paste anyway. It asks every time, and nothing is wrong.

When the text around a box says to change part of a line, the box has that line alone, and pasting it does not run it: it waits after the prompt for you to press Enter. Before you do, change it there. Press the Left arrow key to move back along the line to the part to change, delete it with Backspace, type the new text in its place, then press Enter. If the line went wrong, press Escape to clear it and paste it again.

If you already use Visual Studio, Git and a command prompt, skim the headings and the check and carry on.

  1. Install Visual Studio 2022 or newer, with the Desktop development with C++ workload. The free Community edition is enough.

    Download the installer from visualstudio.microsoft.com/downloads, run it, and on its Workloads tab tick Desktop development with C++. The Installation details list on the right then shows what that workload includes. Check that these three are ticked there, and tick any that are not:

    • C++ CMake tools for Windows
    • vcpkg package manager
    • a Windows 11 SDK (any version)

    Current versions tick all three by default. That workload brings the compiler, CMake, Ninja, vcpkg and the Windows SDK, whose shader compiler the build needs.

    Before you click Install, look at the bottom of the installer’s window, which shows the space the selection needs on each drive. Microsoft’s system requirements say a typical installation needs 20 to 50 GB free. On the desktop these pages were checked on, Visual Studio Community 2026 with this workload and four others takes 9.4 GB in C:\Program Files\Microsoft Visual Studio\18\Community, of which one version of the C++ compiler is 2.4 GB; the Windows SDK takes 2.1 GB in C:\Program Files (x86)\Windows Kits\10; and the installer keeps 4.2 GB of downloaded packages in C:\ProgramData\Microsoft\VisualStudio\Packages: about 16 GB on drive C: in all. The download is several gigabytes, and on a home connection the install takes from tens of minutes to a couple of hours; how long it took was not measured here. Click Install and wait. The installer shows each step’s progress, and you can use the computer meanwhile.

    When it has finished, the installer’s Installed tab lists your Visual Studio with Modify and Launch buttons beside it, and may first ask you to restart Windows. Restart if it asks; you do not need to click Launch, as these pages open Visual Studio only when they need it. Close the installer.

    If Visual Studio is already installed, open Visual Studio Installer from the Start menu, click Modify beside your Visual Studio, and check the same workload and the same three items.

    If the install fails, the installer says so and names the step that failed:

    • Not enough space on a drive: the installer warns about that drive before it starts, or stops partway with a message about disk space. Free space on that drive, for example by emptying the Recycle Bin or uninstalling programs you no longer use in Settings > Apps > Installed apps, then open the installer again from the Start menu and click Modify or Install.
    • A restart is needed, because Windows is still finishing an update or an earlier install: restart, then open Visual Studio Installer from the Start menu and click Modify, then Modify again at the bottom right, or Install if it is not listed yet. It carries on from where it stopped.
    • A download or package failed: check your connection and click Retry if the installer offers it. If Visual Studio is listed but a later step fails, click More beside it and then Repair. Microsoft’s installation troubleshooting page has the further steps, from deleting the installer’s own folder to its live chat.
  2. For the Git route: install Git for Windows, if you do not have it.

    Skip this step if you are going to use the starter project. Its build does not need Git: if Git is not installed, vcpkg, which fetches the engine’s libraries, downloads a private copy of Git for itself the first time, and you never run it.

    Download the 64-bit installer and run it. Its default answer to every question is fine, so click Next on each page and then Install.

    Install Git before opening the command prompt in the next step. A prompt that was already open does not see a program installed after it started, so close it and open a new one if you install Git later.

  3. Open the x64 Native Tools Command Prompt. Click Start, type x64 Native Tools, and click the result whose name begins x64 Native Tools Command Prompt. It is installed with Visual Studio. Every command in this guide runs in it.

    Right after an install, Start’s search can take a while to find it. It is also in Start’s app list: click Start, then All (or All apps) at the top right of the pinned apps, scroll to Visual Studio 2026 (or Visual Studio 2022), open that folder and click x64 Native Tools Command Prompt for VS (with the version after it on Visual Studio 2022). On disk the shortcut is in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2026\Visual Studio Tools\VC, and Explorer opens it from there too. Every later page opens this prompt, so pin it: right-click it and choose Pin to Start or Pin to taskbar.

    The window it opens starts with lines like these, and the last of them must say 'x64':

    Output
    **********************************************************************
    ** Visual Studio 2026 Developer Command Prompt v18.0
    ** Copyright (c) 2026 Microsoft Corporation
    **********************************************************************
    [vcvarsall.bat] Environment initialized for: 'x64'

    The version numbers differ with your Visual Studio. It has to be the x64 prompt. It puts the 64-bit compiler, CMake, Ninja and the shader compiler on your PATH and points VCPKG_ROOT at the copy of vcpkg that Visual Studio installed. Other windows look similar and are wrong for this guide:

    • Developer Command Prompt and Developer PowerShell set up 32-bit tools. They print no Environment initialized for: 'x64' line.
    • x86 Native Tools, x64_x86 Cross Tools and x86_x64 Cross Tools build for, or run as, 32-bit Windows.
    • An ordinary Command Prompt, PowerShell or Terminal window has none of the tools.

    If you opened one of those, close it and open the x64 Native Tools Command Prompt instead. The wrong prompt in Troubleshooting lists what each one prints when you carry on regardless.

  4. Check it. Run these in the prompt:

    Terminal window
    cmake --version
    ninja --version
    where cl fxc
    echo %VSCMD_ARG_TGT_ARCH%
    echo %VCPKG_ROOT%

    Each should print a version or a path rather than an error. On a machine with Visual Studio 2026 Community the output looks like this; the numbers and versions on yours will differ:

    Output
    cmake version 4.3.1-msvc1
    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    1.13.2
    C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.51.36231\bin\Hostx64\x64\cl.exe
    C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\fxc.exe
    x64
    C:\Program Files\Microsoft Visual Studio\18\Community\VC\vcpkg

    What to do if it does not:

    • 'cmake' is not recognized as an internal or external command means this is not the x64 Native Tools Command Prompt. Close it and go back to step 3.
    • INFO: Could not find "fxc". means the Windows SDK is missing. Add it as in step 1.
    • x86 instead of x64 means a 32-bit prompt. Go back to step 3.
    • %VCPKG_ROOT% printed back means vcpkg is not set up: follow If VCPKG_ROOT is not set below.

    If you installed Git in step 2, check it too:

    Terminal window
    where git

    It prints a path such as C:\Program Files\Git\cmd\git.exe. INFO: Could not find "git". means Git is not installed, or was installed after this window opened: do step 2, then open a new prompt.

  5. For the Git route: tell Git who you are. Skip this step if you are going to use the starter project. Git writes a name and an email address into every commit, and refuses to make the first commit in Start your own project until it has them. You only do this once on a machine.

    Paste this line, but before you press Enter, change Your Name to your own name, keeping the quotation marks, as Typing the commands shows:

    Terminal window
    git config --global user.name "Your Name"

    Then paste this one, and before you press Enter, change you@example.com to your email address, again keeping the quotation marks:

    Terminal window
    git config --global user.email "you@example.com"

    They print nothing when they work. The address is recorded in your project’s history, and anyone you share the repository with can read it; it does not have to be one you use for anything else. Check what Git now has:

    Terminal window
    git config --global --get user.name
    git config --global --get user.email

Skip this section if echo %VCPKG_ROOT% printed a folder.

The x64 Native Tools Command Prompt sets VCPKG_ROOT itself, every time it opens, when Visual Studio’s vcpkg package manager component is installed. If it printed %VCPKG_ROOT% back, the component is usually missing. Find out with these two lines. The first finds where Visual Studio is installed and keeps it as VS_DIR; the second looks for vcpkg inside it:

Terminal window
for /f "usebackq delims=" %i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set "VS_DIR=%i"
dir /b "%VS_DIR%\VC\vcpkg\vcpkg.exe"

If the last line prints File Not Found, add the component. Open Visual Studio Installer from the Start menu, click Modify beside your Visual Studio, open the Individual components tab, type vcpkg into its search box, tick vcpkg package manager, and click Modify. When it finishes, close the command prompt, open a new x64 Native Tools Command Prompt, and run echo %VCPKG_ROOT% again. It should now print a folder.

If it prints vcpkg.exe, vcpkg is installed but your version of Visual Studio did not set VCPKG_ROOT. Set it for this window, in the same window as the two lines above:

Terminal window
set "VCPKG_ROOT=%VS_DIR%\VC\vcpkg"
echo %VCPKG_ROOT%

A set lasts only until the window closes. To keep it for every window you open from now on, and for Visual Studio itself, also run:

Terminal window
setx VCPKG_ROOT "%VS_DIR%\VC\vcpkg"

It prints SUCCESS: Specified value was saved. setx changes only windows and programs started after it, so it does not change the window you ran it in, which is why the set line comes first. Close Visual Studio if it is open, so that it reads the new value when you start it again. Visual Studio usually lives under C:\Program Files\Microsoft Visual Studio\<version>\<edition>, where the version is 2022 for Visual Studio 2022 and 18 for Visual Studio 2026, and the edition is Community, Professional or Enterprise; the for line above finds it so you need not guess.

Make a folder for your projects close to the root of a drive, and use it in the steps that follow. These pages use C:\dev. Make it, and go into it:

Terminal window
mkdir C:\dev
cd /d C:\dev

If C:\dev is already there, mkdir says A subdirectory or file C:\dev already exists., which is harmless. The /d lets cd change drive as well as folder, so the line works whichever drive the prompt started on. The prompt now ends C:\dev>.

Keep the path of your project’s folder under 100 characters; C:\dev\mygame is 13, and C:\dev\Labrador, the Git route’s engine folder, is 15. The build writes files up to about 150 characters below that folder, and the compiler cannot open a path longer than 260 characters, even when long paths are enabled in Windows. A build in a deeper folder warns about CMAKE_OBJECT_PATH_MAX when it configures, then stops with fatal error C1083: Cannot open compiler generated file: '': Invalid argument. Folders under Documents, Desktop, Downloads or OneDrive are usually too deep, and OneDrive also tries to upload the gigabyte of build files.

git config --global core.longpaths true does not get round this. It lets Git clone into a deep folder, where a clone would otherwise fail with Filename too long, but the build in that folder still fails.

If your projects have to live in a deep folder, give that folder a drive letter of its own with subst and work from the drive. The compiler then sees the short path. Git still sees the real one, so it needs core.longpaths as well:

Terminal window
git config --global core.longpaths true

Then paste this line, and before you press Enter, change the folder after P: to your own:

Terminal window
subst P: C:\Users\you\source\repos\clients\studio\projects

It prints nothing when it works. Then go to the new drive:

Terminal window
P:

Use P:\ wherever the following pages use C:\dev. The drive letter lasts until you sign out, so run the subst line again after signing in, and always open the project through the drive letter: a build folder belongs to the path it was configured from.

On 31 October 2026 the sizes in step 1 were measured on the owner’s desktop, which has Visual Studio Community 2026 18.9 with the Desktop development with C++, Game development with C++, Python development, .NET desktop development and core editor workloads, and two versions of the C++ compiler. The C++ workload alone needs less than the 16 GB total measured there. The installer was not run for these pages: how long a fresh install takes, the finished Installed tab and the installer’s failures are written from Microsoft’s system requirements and installation troubleshooting pages. The x64 Native Tools Command Prompt for VS shortcut was found in the Start menu folder step 3 names. A second agent measured the same three sizes, found the shortcut under Visual Studio Tools\VC, and read the same 20 to 50 GB on Microsoft’s page; neither agent clicked through the Start menu’s All list.

Documentation for Labrador v0.3.0. Built from Labrador 0f4f503 of 2026-11-03.

All documentation versions