Some examples can break due to dependency on headers coming from different files
Author: sleeptightAnsiCCreated Nov 4, 2025Updated Jul 22, 2026
Many demo examples make an assumption that they can use symbols coming from a different file, due to indirect header inclusion. For example, Nuklear/demo/common/overview.c uses libm math symbols, but never includes <math.h> or any similar header:
This breaks, if I try to provide my own NK_SIN/NK_COS/STBTT_sqrt/etc in one of the demo files, and then remove the math header there. This has happened to me when working on updated sdl3_renderer. In newer version of SDL3, <SDL3/SDL.h> does not pull <math.h> any more, and provides its own version of math symbols.
Note that Nuklear/demo/common/overview.c and <math.h> is just an example here. More demos are affected by this issue due to all kinds of headers.
Source: Immediate-Mode-UI/Nuklear