Skip to main content
gamedev.net
🔒 Locked

Checking SDL Version

Started by nto 0 replies 600+ views
Original Post
nto
nto
Hey everybody! I'm fairly new to SDL programmering and couple of weeks ago I remember reading some function where they checked the compiled version of SDL against the version of SDL running on the local computer. Does anyone know how to do this? I would like to be able to check if the system meets the SDL version requirements and print an error message if it's not the case. Thanks in advance, nto.
nto
nto
Finally found something useful:

void printVersion()
{
SDL_version compileVersion;
SDL_VERSION(&compileVersion);
printf("Compiled with SDL version: %d.%d.%d\n",
compileVersion.major,
compileVersion.minor,
compileVersion.patch);

#if !WIN32_VERSION
const SDL_version *linkedVersion(SDL_Linked_Version());
printf("Running with SDL version: %d.%d.%d\n",
linkedVersion->major,
linkedVersion->minor,
linkedVersion->patch);
#endif

}

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.