Getting SDL version

I know there’s the version defines in version.h, but if I did something
like this:

printf(“SDL version = %d.%d.%d”, MAJOR, MINOR, PATCH);

then it would just say what version of SDL was used to compile with, not
what version of the library we’re using, so if someone upgraded the
library, we’d be unable to tell what the current library version was.

Is there a way to tell what version of the library we’re using, not what
was used to compile?

Is there a way to tell what version of the library we’re using, not what
was used to compile?

SDL_Version()

Yes, check out SDL_Linked_Version()…

http://www.libsdl.org/cgi/cvsweb.cgi/~checkout~/SDL12/include/SDL_version.h?rev=1.9&content-type=text/plain

Best wishes,

-LorenOn Wed, 2002-09-04 at 12:21, Brad wrote:

I know there’s the version defines in version.h, but if I did something
like this:

printf(“SDL version = %d.%d.%d”, MAJOR, MINOR, PATCH);

then it would just say what version of SDL was used to compile with, not
what version of the library we’re using, so if someone upgraded the
library, we’d be unable to tell what the current library version was.

Is there a way to tell what version of the library we’re using, not what
was used to compile?