This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
/
testver.c
30 lines (25 loc) · 718 Bytes
1
2
3
4
5
6
/* Test program to compare the compile-time version of SDL with the linked
version of SDL
*/
#include <stdio.h>
7
#include <stdlib.h>
8
9
10
#include "SDL.h"
11
12
int
main(int argc, char *argv[])
13
{
14
SDL_version compiled;
15
SDL_version linked;
16
17
18
#if SDL_VERSION_ATLEAST(1, 3, 0)
printf("Compiled with SDL 1.3 or newer\n");
19
#else
20
printf("Compiled with SDL older than 1.3\n");
21
#endif
22
SDL_VERSION(&compiled);
23
printf("Compiled version: %d.%d.%d (%s)\n",
24
25
compiled.major, compiled.minor, compiled.patch, SDL_REVISION);
SDL_GetVersion(&linked);
26
printf("Linked version: %d.%d.%d (%s)\n",
27
linked.major, linked.minor, linked.patch, SDL_GetRevision());
28
29
SDL_Quit();
return (0);
30
}