|
Size: 1298
Comment: update content (w/ Sam)
|
Size: 1281
Comment: minor change
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 32: | Line 32: |
| If you are linking to SDL dynamically, then it is possible that the current version will be different than the version you compiled against. .[[SDL_GetVersion]]() returns the current version number. .[[SDL_VERSION]] is a macro that tells you what version of SDL you compiled against. |
If you are linking to SDL dynamically, then it is possible that the current version will be different than the version you compiled against. This function returns the current version number. [[SDL_VERSION]] is a macro that tells you what version you compiled against. |
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 the current version will be different than the version you compiled against. This function returns the current version number.
SDL_VERSION is a macro that tells you what version you compiled against.
This function may be called safely at any time, even before SDL_Init().
