Closed PathogenDavid closed 2 years ago
(I initially mentioned this here: https://github.com/dearimgui/dear_bindings/issues/13#issuecomment-902662605)
Even though C++ users shouldn't really generally be using cimgui.h, it should include an extern "C" block when it's built as C++ to ensure linking happens correctly. IE:
cimgui.h
extern "C"
#ifndef IMGUI_H #ifdef __cplusplus extern "C" { #endif // dear imgui, v1.84 WIP // ...header contents goes here... #ifdef __cplusplus } #endif #endif
After this change, the explicit extern "C" block in the generated cimgui.cpp can be removed.
cimgui.cpp
Very good idea - I've added support for that and removed the block from cimgui.cpp. 7e3cd50a39805022e09e7d379b80ac966ff667f9
(I initially mentioned this here: https://github.com/dearimgui/dear_bindings/issues/13#issuecomment-902662605)
Even though C++ users shouldn't really generally be using
cimgui.h
, it should include anextern "C"
block when it's built as C++ to ensure linking happens correctly. IE:After this change, the explicit
extern "C"
block in the generatedcimgui.cpp
can be removed.