Sign in to follow this  

Checking SDL Version

This topic is 3861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

}

Share this post


Link to post
Share on other sites

This topic is 3861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this