# Hi there. I'm having some trouble wrapping imgui. ImGui::GetIO returns # `ImGuiIO&` so I tried to wrap it like this: type IO {.importcpp:"ImGuiIO".} = object configFlags {.importcpp:"ConfigFlags".}: Flags[ConfigFlag] displaySize {.importcpp:"DisplaySize".}: Vec2 framerate {.importcpp:"Framerate".}: cfloat proc getIO: ptr IO {.importcpp:"ImGui::GetIO".} # But when compiling, I get this error /home/riku/.cache/nim/test_d/@mtest.nim.cpp: In function ‘void maintest_u6()’: /home/riku/.cache/nim/test_d/@mtest.nim.cpp:301:51: error: cannot convert ‘ImGuiIO’ to ‘ImGuiIO’ in initialization 301 | nimln_(35); ImGuiIO io = ImGui::GetIO(); | ~~~~~~~~~~~~^~ | | | ImGuiIO # I tried to look at how nimgl does it but it looks exactly the same. Except # they're wrapping cimgui instead of imgui. How could I fix this? I've tried # returning `var IO` instead which compiles but gives an unchanging object # (framerate stays at 0 and displaySize stays at -1)