> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.stereolabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.stereolabs.com/_mcp/server.

# Building a C++ Application on Windows

This section explains how to build an application with the ZED SDK on Windows platforms.

![image](/_fern-files/stereolabs.docs.buildwithfern.com/3f515c14faf87b65fa8393a7e3904bb4f4dcb5bea2369535623511388df433c2/docs/development/images/Result.png)

## Setting Up a Project

We will build a simple tutorial application **Hello ZED** using the ZED SDK and CMake. [CMake](https://cmake.org) is a cross-platform project generation tool. It provides an easy way to build project files that can be used in the compiler environment of your choice. For example, a CMake script can produce Visual Studio projects and solution files.

* Download and install the latest [ZED SDK](https://www.stereolabs.com/developers/release/).
* Download the [ZED Examples](https://github.com/stereolabs/zed-sdk/archive/master.zip) sample code available on our [GitHub](https://github.com/stereolabs/zed-sdk) page. You can also browse our GitHub for additional plugins and sample codes.
* Open the *tutorials/tutorial 1 - hello ZED/cpp* folder to find the code we will build. The following files should be in the directory:
  * CMakeLists.txt
  * main.cpp
  * README.md

## Building on Windows

On Windows, building an application with the ZED SDK requires [CMake](https://cmake.org) 3.5.0 or higher and [Visual Studio](https://visualstudio.microsoft.com/downloads/) 2019 or 2022 (the ZED SDK requires a C++17 compiler since version 5.1). Applications must be compiled for 64-bit.

> **Note**
>
> When installing Visual Studio, make sure to select the *Visual C++* option.

![image](/_fern-img/5d6db91cd6fb232590c2956085d5d3c14507dd9285dfa6a7459c8b2cd36669bc.webp)

* Open cmake-gui.
* In “Where is the source code“, enter the path of the project folder where the CMakeLists.txt is located. Here we created a project folder "ZED\_Tutorial\_1" in Documents.
* In “Where to build the binaries“, enter the previous path and add: /build.
* Click on \[*Configure*].

![image](/_fern-files/stereolabs.docs.buildwithfern.com/5bfb4ac061b6d32e20a3fa295640f4a15f6803d2399c56774065ad1b5e49542d/docs/development/images/cmake_configure.png)

* A dialog window asks you if CMake can create the “build” folder. Say yes.
* Another dialog window will ask you to specify a generator for your project. Choose [Visual Studio](https://visualstudio.microsoft.com/downloads/) in **Win64** and click on \[*Finish*].

![image](/_fern-files/stereolabs.docs.buildwithfern.com/76f396cec1ee08f4665c6a7ffbe685a557e261e8148304c07c8942a0221fd7cb/docs/development/images/cmake_prompt.png)

> **Note**
>
> CMake needs to define the target platform as x64. On newer versions it is set by default; if not, you can set it manually.

![image](/_fern-files/stereolabs.docs.buildwithfern.com/3f14951dd13c3b1e33355ba40c59cd0aed44bf54ce33f18d750bc634eee20863/docs/development/images/cmake_prompt_new.png)

* CMake may take a few seconds to configure the project.
* Click on \[*Generate*] to build the Visual Studio project files.

![image](/_fern-files/stereolabs.docs.buildwithfern.com/703de1b48a349dd6cfe68208523b9e9c5a94fed0dfd5bb35f7bb7a85467442b2/docs/development/images/cmake_generate.png)

* CMake has now generated your project in the build directory.
  You can directly open the solution by clicking on \[*Open Project*] or by closing the cmake-gui window and opening the **build** folder.

![image](/_fern-img/2e6b7d81d938bde0ca078381df25cf8bc0059caa8d9e861a0f98f1b04ed3c0d8.webp)

* A Visual Studio solution has been generated. Open **ZED\_Tutorial\_1.sln** and set it in `Release` mode.

![image](/_fern-files/stereolabs.docs.buildwithfern.com/39e44518b702afc1f061b1dc6f35ac9182608b3e20d4fe1efdd7df5253183fe7/docs/development/images/release_mode.png)

* To run the builds from the *Build* menu or from keyboard shortcuts, set the `ZED_Tutorial_1` target as the startup project.

![image](/_fern-files/stereolabs.docs.buildwithfern.com/925f9c387074b379896b93cefb09f5400bf7b92546aaabce87a2e46386fcb590/docs/development/images/startup_project.png)

* You can now edit and compile your program in the Visual Studio IDE. Hit the `Ctrl+F5` key to launch the program.