Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2010-04-13 00:02:10
Size: 1669
Editor: SheenaSmith
Comment: create page, add content (Wed Mar 10 ver)
Revision 2 as of 2010-04-20 17:48:48
Size: 1652
Editor: SheenaSmith
Comment: minor change
Deletions are marked like this. Additions are marked like this.
Line 20: Line 20:
\code
Line 30: Line 29:
\endcode

DRAFT

SDL_GetVersion

Use this function to get the version of SDL that is linked against your program.

Syntax

void SDL_GetVersion(SDL_version* ver)

Function Parameters

ver

a pointer to the SDL_version structure that contains the version information

Code Examples

SDL_version compiled;
SDL_version linked;

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 linked against SDL version %d.%d.%d.\n",
       linked.major, linked.minor, linked.patch);

Remarks

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. green

This is a real function; the macro SDL_VERSION() tells you what version of SDL you compiled against: green

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


CategoryAPI, CategoryVersion

None: SDL_GetVersion (last edited 2010-10-18 22:02:11 by SheenaSmith)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit