hnOsmium0001 / imgui-command-palette

Sublime Text or VSCode style command palette in ImGui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error

g-tejas opened this issue · comments

Im getting the following errors when i try to build, (i havent even included the header in my main file yet)

/Users/-/Developer/enigma/external/imgui/imgui_internal.h:101:2: error: Please '#define IMGUI_DEFINE_MATH_OPERATORS' _BEFORE_ including imgui.h!
#error Please '#define IMGUI_DEFINE_MATH_OPERATORS' _BEFORE_ including imgui.h!
 ^
/Users/-/Developer/enigma/external/imgui_command_palette/imcmd_command_palette.cpp:631:34: error: invalid operands to binary expression ('ImVec2' and 'ImVec2')
            window->DC.CursorPos + ImGui::CalcItemSize(size, 0.0f, 0.0f),
            ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
make[2]: *** [CMakeFiles/enigma.dir/external/imgui_command_palette/imcmd_command_palette.cpp.o] Error 1
make[1]: *** [CMakeFiles/enigma.dir/all] Error 2

I moved the #define to be before the imgui.h but it still doesn't work. Any idea on how i can fix this?

This is fixed in 2afae6a