---
name: "SDL_MAIN_USE_CALLBACKS"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_MAIN_USE_CALLBACKS"
---

# SDL\_MAIN\_USE\_CALLBACKS(3)

Inform SDL to use the main callbacks instead of main.

## NAME

SDL\_MAIN\_USE\_CALLBACKS - Inform SDL to use the main callbacks instead of main.

## HEADER FILE

Defined in SDL3/SDL\_main.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**#define SDL\_MAIN\_USE\_CALLBACKS 1**

## DESCRIPTION

SDL does not define this macro, but will check if it is defined when including **SDL\_main.h** . If defined, SDL will expect the app to provide several functions:  **SDL\_AppInit** ,

**SDL\_AppEvent** ,  **SDL\_AppIterate** , and

**SDL\_AppQuit** . The app should not provide a **main** function in this case, and doing so will likely cause the build to fail.

Please see \[README/main-functions\](README/main-functions), (or docs/README-main-functions.md in the source tree) for a more detailed explanation.

## AVAILABILITY

This macro is used by the headers since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_AppInit**(3)](/SDL_AppInit/3.md), **•**(3), [**SDL\_AppEvent**(3)](/SDL_AppEvent/3.md), **•**(3), [**SDL\_AppIterate**(3)](/SDL_AppIterate/3.md), **•**(3), [**SDL\_AppQuit**(3)](/SDL_AppQuit/3.md)
