END_OF_MAIN(3alleg4)
π NAME π
END_OF_MAIN β the macro you put after your main() function, bestie. It's part of the Allegro game programming library. β¨
πΈ SYNOPSIS πΈ
#include <allegro.h>
Macro END_OF_MAIN()
π¦ DESCRIPTION π¦
okay so listen. For cross-platform compatibility β like, the whole reason this thing exists β you have to put this macro at the very, very end of your main function. Like, after the closing brace. Not inside. After. π
This macro does some lowkey magic'</purple> to mangle your main` procedure on the platforms that need it, and the ones that need it are: Windows, some flavours of UNIX, and MacOS X. They're the ones being extra about it. π
But on the other platforms? It literally compiles to nothing. Zero. Zilch. So you do not have to #ifdef around it β no cap, just drop it in and forget about it. That's the whole vibe. π«Ά
Example, because a visual helps:
int main(void)
{
allegro_init();
/* more stuff goes here */
...
return 0;
}
END_OF_MAIN()
See how it's just chilling after the }? That's the assignment. Main character macro behavior honestly. π
β SEE ALSO β
Allegro β the whole library, the moment, the icon. π
okay that's the whole page, you're literally done π huge thanks to the Allegro girlies for this one β this is Allegro version 4.4.3 and the page is END_OF_MAIN(3alleg4), slay, go write some cross-platform game code bestie πβ¨
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms