mirror of
https://github.com/cimgui/cimgui.git
synced 2026-08-29 13:01:31 +00:00
The test at the end of cimgui_generation passes neither -c nor -E, so gcc compiles the .h into a precompiled header and then still tries to link, failing with "undefined reference to `main'" whenever the toolchain puts something link-ish on the command line (a -Wl,... or -L from a spec file or a compiler wrapper). That aborts generation via the assert in get_cdefs. -fsyntax-only is all this check needs, since only the diagnostics are inspected and the get_cdefs return value is discarded. -x c is needed too, without it gcc 5 stays in precompiled-header mode and fails with "output filename specified twice".