epezent / implot

Immediate Mode Plotting
MIT License
4.84k stars 531 forks source link

Constructors and Functions of structs don't have the IMPLOT_API macro #545

Open Cidolfas opened 11 months ago

Cidolfas commented 11 months ago

I've been using the https://github.com/aybe/DearImGui project to generate C# bindings for imgui and implot, and I ran into an issue (https://github.com/aybe/DearImGui/issues/24) where the generated code calling a non-default constructor for ImPlotPoint would cause an EntryPointNotFoundException.

After digging into it some, the root issue is simply that none of the constructors for ImPlotPoint wind up in the dll's exports when using the IMPLOT_API macro when that expands to "__declspec(dllexport)". In fact, none of those constructors - and for that matter, none of the constructors or member functions of any other struct in implot - have the IMPLOT_API macro in front of them in the source.

Was this an intentional choice in implot?

I checked with imgui's source and the structs there (e.g. ImGuiStyle) do have IMGUI_API declared for constructors and member functions.