Wiki Page Content

SDL_version

Data Fields

Uint8

major

major version

Uint8

minor

minor version

Uint8

patch

update version (patchlevel)

Code Examples

SDL_versioncompiled;SDL_versionlinked;SDL_VERSION(&compiled);SDL_GetVersion(&linked);printf("We compiled against SDL version %d.%d.%d ...\n",compiled.major,compiled.minor,compiled.patch);printf("But we are linking against SDL version %d.%d.%d.\n",linked.major,linked.minor,linked.patch);

Remarks

Represents the library's version as three levels:

major revision (increments with massive changes, additions, and enhancements)

minor revision (increments with backwards-compatible changes to the major revision), and

patchlevel (increments with fixes to the minor revision)

The macro SDL_VERSION can be used to populate this structure with information.