libsdl-org / sdlwiki

This is the raw contents of SDL's wiki. You can edit this through GitHub or at https://wiki.libsdl.org/ now!
https://wiki.libsdl.org/
79 stars 32 forks source link

Wiki: Add header Inclusion graph #531

Closed Sackzement closed 3 months ago

Sackzement commented 3 months ago

A wiki page with an overview of the header inclusions could be helpful. To give you an idea, here is a screenshot of a graph I created a while ago.

SDL Inclusion Graph

in reference to libsdl-org/SDL#9440

slouken commented 3 months ago

In general we recommend just using: #include <SDL3/SDL.h>

Sackzement commented 3 months ago

In general we recommend just using: #include <SDL3/SDL.h>

Is it just because it is easier? I like to include only the headers which are used. It makes auto-completion more clear. Am I missing something?

slouken commented 3 months ago

It's just because it's easier, and also because if you're using precompiled headers you want the same content in the precompiled header everywhere you use it.

Sackzement commented 3 months ago

Thanks for explaining! Some day I'll have to switch to these fancy "new" features like precompiled headers and unity builds. Maybe when I stop drinking coffee :)

Edit: Unity builds would be for constantly full coffee cups.