> 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.

# Installing the ZED C API

This section explains how to use the ZED SDK in C on Windows and Linux platforms.
The C API is a wrapper around the ZED SDK which is written in C++ optimized code.

Download the ZED C-API code available on our [GitHub](https://github.com/stereolabs/zed-c-api).

## 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.

* Open cmake-gui.
* In “Where is the source code“, enter the path of the project folder where the CMakeLists.txt is located.
* In “Where to build the binaries“, enter the previous path and add: /build.
* Click on \[*Configure*].

![image](/_fern-img/86b6fbdd4c9168582c805ca99ff4363fb876e64eafe8468c57b771c1ae5bc5de.webp)

* 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-img/5a7d8c898c8b8fb79e4eb5c2c7aa598f6cdb2e5bb1f43293bd84e8c0cb6ca657.webp)

* CMake may take a few seconds to configure the project.

* Click on \[*Generate*] to build the Visual Studio project files.

* 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.

* A Visual Studio solution has been generated. Open **zed\_c\_api.sln** and set it in `Release` mode.

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

* To build the ZED C-API, right-click on the **sl\_zed\_c** project and click **Build**.

![image](/_fern-img/691f3d22582895460628306b2ae600c6b39cf68e910d42b0678a91e360516fd0.webp)

* Build the **INSTALL** solution.

## Building on Linux

Open a terminal in the root directory and execute the following command:

```bash
mkdir build
cd build
cmake ..
make
sudo make install
```