Skip to content

imgui 1.43 MinGW missing header (alloca.h) #276

Description

@unpacklo

I don't do normal development on Windows so I didn't catch this earlier, sorry!

I tried to update our game to 1.43 today and our build servers hit this error on Windows with MinGW:

imgui/imgui.cpp:474:34: fatal error: alloca.h: No such file or directory
 #include <alloca.h>     // alloca
                                  ^
compilation terminated.

It seems that MinGW does not supply this header. I ended up fixing this by using this #if sequence instead:

#if defined(_MSC_VER) || defined(__MINGW32__)
#include <malloc.h>     // alloca
#else
#include <alloca.h>     // alloca
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions