SDL  2.0
testver.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "SDL.h"
#include "SDL_revision.h"
+ Include dependency graph for testver.c:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 24 of file testver.c.

References SDL_version::major, SDL_version::minor, SDL_version::patch, SDL_GetRevision, SDL_GetRevisionNumber, SDL_GetVersion, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogSetPriority, SDL_Quit, SDL_REVISION, SDL_REVISION_NUMBER, and SDL_VERSION.

{
SDL_version compiled;
SDL_version linked;
/* Enable standard application logging */
#if SDL_VERSION_ATLEAST(2, 0, 0)
SDL_Log("Compiled with SDL 2.0 or newer\n");
#else
SDL_Log("Compiled with SDL older than 2.0\n");
#endif
SDL_VERSION(&compiled);
SDL_Log("Compiled version: %d.%d.%d.%d (%s)\n",
compiled.major, compiled.minor, compiled.patch,
SDL_GetVersion(&linked);
SDL_Log("Linked version: %d.%d.%d.%d (%s)\n",
linked.major, linked.minor, linked.patch,
return (0);
}