SDL_GetVersion

Name

SDL_GetVersion -- Get the version of SDL that is linked against your program.

Synopsis

#include "SDL_version.h"

void SDL_GetVersion (SDL_version* ver);

Description

SDL_GetVersion gets the version of SDL that is linked against your program.

If you are using a shared library (DLL) version of SDL, then it is possible that it will be different than the version you compiled against.

This is a real function; the macro SDL_VERSION tells you what version of SDL you compiled against.

Return Value

This is a void function and returns nothing.

Note: This function may be called safely at any time, even before SDL_Init().

Example

   1  SDL_version compiled;
   2  SDL_version linked;
   3 
   4  SDL_VERSION(&compiled);
   5  SDL_GetVersion(&linked);
   6  printf("We compiled against SDL version %d.%d.%d ...\n",
   7            compiled.major, compiled.minor, compiled.patch);
   8  printf("But we linked against SDL version %d.%d.%d.\n",
   9            linked.major, linked.minor, linked.patch);

See Also

SDL_VERSION, SDL_version, SDL_GetRevision


CategorySDL13API CategorySDL13APIVersion

SDL-1.3/SDL_GetVersion (last edited 2009-07-27 01:20:56 by KenBull)