Flix01 / imgui

Dear ImGui Addons Branch = plain unmodified dear imgui plus some extra addon.
https://github.com/Flix01/imgui/wiki/ImGui-Addons-Branch-Home
MIT License
395 stars 34 forks source link

multiple definition of `gImGuiUserEventCallback' #22

Closed traw closed 7 years ago

traw commented 7 years ago

When implementing gImGuiUserEventCallback in SDL2 binding causing linker error.

/imgui-Flix01/imgui.cpp.o:(.bss+0x1f0): multiple definition of `gImGuiUserEventCallback'

my code snippet: ImImplVoidDelegateTakingVoidPtr gImGuiUserEventCallback = HandleUserEvent; It's because of Defination of gImGuiUserEventCallback in imguibindings.cpp, So if I comment it, it works fine.

Flix01 commented 7 years ago

gImGuiUserEventCallback is already defined in imguibinding.cpp and set to NULL. So you must just assign it: gImGuiUserEventCallback = &HandleUserEvent;

Also see: https://github.com/Flix01/imgui/issues/28