SDL_DECLSPEC(3)
π SDL_DECLSPEC π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, this one's literally called SDL_DECLSPEC(3) and it's short but it's iconic π«Ά
β¨ NAME β¨
SDL_DECLSPEC β a macro that tags a symbol as a public API. that's it. that's the whole vibe. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_begin_code.h>
#define SDL_DECLSPEC __attribute__ ((visibility("default")))
β¨ DESCRIPTION β¨
so, like, SDL uses this macro on all of its public functions. every single one. no cap. π
on some targets, it's the thing that signals to the compiler "hey bestie, this function needs to be exported from a shared library," but ngl it might also have other side effects depending on where you're building. it's giving "multitasking icon" β¨
and here's the cute part: this symbol shows up all over SDL's headers, but apps and other libraries are totally welcome to use it for their own interfaces too. it's not gatekept. it's community property fr fr π¦
lowkey a little macro doing a lot of heavy lifting for the whole shared-library situation, and we love her for it. π
β¨ AVAILABILITY β¨
this macro has been available since SDL 3.2.0. so if you're on anything olderβ¦ bestie, respectfully, time to update. π
and that's the whole page!! tysm for reading, mwah π
Simple Directmedia Layer πΈ SDL 3.4.18 π SDL_DECLSPEC(3) β slay, periodt, go export some symbols πβ¨π
π¦ 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