Wiki Page Content

Differences between revisions 4 and 5
Revision 4 as of 2010-04-20 18:28:42
Size: 1723
Editor: SheenaSmith
Comment: temp save w comment between code example boxes
Revision 5 as of 2010-07-21 05:09:01
Size: 1322
Editor: SheenaSmith
Comment: update content (w/ Sam)
Deletions are marked like this. Additions are marked like this.
Line 30: Line 30:
## End 1
{{{#!highlight cpp
You can add your code example here
}}}
Line 36: Line 32:
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.  <<Color2(green,Can this function distinguish between the two? It isn't clear.)>> If you are linking to SDL dynamically, then it is possible that it will be different than the version you compiled against.
Line 38: Line 34:
This is a real function; the macro SDL_VERSION() tells you what version of SDL you compiled against: <<Color2(green,This line ends w/ a colon and is immediately before the code example in the header. Is it supposed to be in the Code Examples section? Inside the box or outside? Also it is not clear what this sentence is saying. How is this function different from the macro? Does it tell you 2 things while the macro only tells one?)>> This is a real function; the macro SDL_VERSION() tells you what version of SDL you compiled against. If you are dynamically linking to SDL the return value of the two may be different.
Line 43: Line 39:
 .[[SDL_GetRevision]]

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 linking to SDL dynamically, 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. If you are dynamically linking to SDL the return value of the two may be different.

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