SDL_IMAGE_VERSION_ATLEAST(3)

okay bestie, welcome to SDL_IMAGE_VERSION_ATLEAST(3) ๐Ÿ’– this page is from the SDL_image3 FUNCTIONS manual, and itโ€™s literally a one-macro wonder. no cap.

๐ŸŽ€ NAME ๐ŸŽ€

SDL_IMAGE_VERSION_ATLEAST โ€” this macro will evaluate to true if you compiled with SDL_image at least X.Y.Z. Thatโ€™s it, thatโ€™s the whole serve: a version vibe check for your build. โœจ

๐ŸŒธ SYNOPSIS ๐ŸŒธ

okay so hereโ€™s the exact spell, backslashes and all โ€” copy it carefully, bestie, because line continuations are not a drill ๐Ÿซถ

#include <SDL3_image/SDL_image.h>

#define SDL_IMAGE_VERSION_ATLEAST(X, Y, Z) \
    ((SDL_IMAGE_MAJOR_VERSION >= X) && \
     (SDL_IMAGE_MAJOR_VERSION > X || SDL_IMAGE_MINOR_VERSION >= Y) && \
     (SDL_IMAGE_MAJOR_VERSION > X || SDL_IMAGE_MINOR_VERSION > Y || SDL_IMAGE_MICRO_VERSION >= Z))

The placeholders X, Y, and Z are the version numbers youโ€™re checking against. The macro walks the major/minor/micro checks in order, and it evaluates to true when the SDL_image you compiled with is at least X.Y.Z. Slay. ๐Ÿ’…


sign-off from the footer, bestie: source is SDL_image, version is SDL_image 3.4.4, and the page is SDL_IMAGE_VERSION_ATLEAST(3) ๐Ÿฆ‹ the footer doesnโ€™t spell out a separate date here, so Iโ€™m not inventing one โ€” periodt. ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from