view src/main.c @ 1:0aaa058b0994

Version with sdl and sdl_ttf functions.
author Eris Caffee <discordia@eldalin.com>
date Thu, 14 Oct 2010 00:42:55 -0500
parents bacb3b7b582e
children 837f5d6c4a72
line source
1 /******************************************************************************
2 //
3 // check-sdl-version
4 // Copyright (c) 2010 Sarah Eris Horsley Caffee
5 //
6 // Just a quick test program to verify SDL installation and to use as an
7 // example for learning to use CMake.
8 //
9 // This program may be freely copied, distributed, and used for any purpose.
10 //
11 ******************************************************************************/
13 #include <stdio.h>
14 #include <SDL.h>
15 #include <SDL_ttf.h>
17 int main(int argc, char **argv)
18 {
19 SDL_version compiled;
20 const SDL_version * linked;
21 SDL_version ttf_compiled;
22 const SDL_version * ttf_linked;
24 printf("\t\t\tCompiled\t\tLinked\n");
26 SDL_VERSION(&compiled);
27 linked = SDL_Linked_Version();
28 printf("SDL version\t\t%d.%d.%d\t\t\t%d.%d.%d\n", compiled.major, compiled.minor, compiled.patch,
29 linked->major, linked->minor, linked->patch);
31 SDL_TTF_VERSION(&ttf_compiled);
32 ttf_linked = TTF_Linked_Version();
33 printf("SDL_ttf version\t\t%d.%d.%d\t\t\t%d.%d.%d\n", ttf_compiled.major, ttf_compiled.minor, ttf_compiled.patch,
34 ttf_linked->major, ttf_linked->minor, ttf_linked->patch);
36 }