---
name: "SDL::Version"
section: "3pm"
platform: "linux"
package: "libsdl-perl"
version: "2.548-5+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL::Version"
---

# SDL::Version(3pm)

SDL Bindings for structure SDL\_Version

## NAME

SDL::Version - SDL Bindings for structure SDL\_Version

## CATEGORY

Core, Structure

## SYNOPSIS

```
 use SDL;
 use SDL::Version;
 # print compile-time version
 printf("SDL::version is %d.%d.%d\n", SDL::version->major,
                                      SDL::version->minor,
                                      SDL::version->patch);
 # print linked version
 printf("SDL::linked_version is %d.%d.%d\n", SDL::linked_version->major,
                                             SDL::linked_version->minor,
                                             SDL::linked_version->patch);
```

## DESCRIPTION

The `"SDL::Version"` structure is used by the `"SDL::linked_version"` function and the `"SDL::version"` macro. The `"SDL::linked_version"` function returns the link-time SDL version whereas `"SDL::version"` returns the compile-time SDL version. **Note:** This is the SDL version, not the SDL\_Perl version. The SDL\_Perl version is in `$SDL::VERSION`.

## METHODS

### major

Returns the major version number.

### minor

Returns the minor version number.

### patch

Returns the patch version number.

## AUTHORS

See "AUTHORS" in SDL.
