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

# SDL\_main\_func(3type)

The prototype for the application's main() function

## NAME

SDL\_main\_func - The prototype for the application's main() function

## HEADER FILE

Defined in SDL3/SDL\_main.h

## SYNOPSIS

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

**typedef int (SDLCALL \*SDL\_main\_func)(int argc, char \*argv\[\]);**

## FUNCTION PARAMETERS

- *argc*

  an ANSI-C style main function's argc.

- *argv*

  an ANSI-C style main function's argv.

## RETURN VALUE

Returns an ANSI-C main return code; generally 0 is considered successful program completion, and small non-zero values are considered errors.

## AVAILABILITY

This datatype is available since SDL 3.2.0.
