SDL_FILE(3)
π SDL_FILE(3) π
the SDL3 functions era, but make it a macro β¨
okay bestie, so this is SDL_FILE, one of the lil SDL3 macros, and she's here to tell you which file is being compiled right now. group chat location sharing but for your preprocessor. π
πΈ NAME πΈ
SDL_FILE β a macro that reports the current file being compiled. that's it, that's the whole job, and she does it flawlessly. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_assert.h>
#define SDL_FILE __FILE_NAME__
look at her. two lines. zero drama. iconic. π¦
π DESCRIPTION π
so here's the tea: this macro is only defined if it isn't already defined. meaning if you roll up with your own SDL_FILE, SDL is not gonna fight you over it β it respects your hustle. π«Ά
which is good news, because you might want to override it. specifically, you can define this macro before including SDL.h or SDL_assert.h if you want it to be something that doesn't provide path information at all.
and why would you do that, bestie? so that build machine information doesn't leak into public binaries. π no cap, nobody needs your laptop's entire directory tree showing up in a shipped release. privacy is main character energy. π
lowkey important: if you're overriding it, do it before the include, not after. the order is the whole vibe check. β
π AVAILABILITY π
this macro has been available since SDL 3.2.0. so if you're on anything older, she simply does not exist yet. sorry babe. π
mwah π that's the page. go forth and compile responsibly. πΈβ¨
signing off β brought to you by Simple Directmedia Layer, running the SDL 3.4.18 edition of these here manual pages. ππ¦π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms