---
name: "SDL_SetMainReady"
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_SetMainReady"
---

# SDL\_SetMainReady(3)

Circumvent failure of SDL\_Init () when not using SDL\_main () as an entry point.

## NAME

SDL\_SetMainReady - Circumvent failure of  **SDL\_Init** () when not using  **SDL\_main** () as an entry point.

## HEADER FILE

Defined in SDL3/SDL\_main.h

## SYNOPSIS

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

**void SDL\_SetMainReady(void);**

## DESCRIPTION

This function is defined in  **SDL\_main** .h, along with the preprocessor rule to redefine main() as  **SDL\_main** (). Thus to ensure that your main() function will not be changed it is necessary to define  **SDL\_MAIN\_HANDLED**\
  before including SDL.h.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_Init**(3)](/SDL_Init/3.md)
