Closed sampletext32 closed 4 months ago
Hmm... so the _Z*
stuff looks like C++ name mangling at work, so I think you're exporting the C++ symbols from ImGui rather than the C ones. Looking at your dockerfile, it seems to be setting -DIMGUI_IMPL_API='extern "C" __declspec(dllexport)'
, which I suspect would have that effect as IMGUI_IMPL_API
is the macro used by the original C++ headers, not the C ones, which use CIMGUI_IMPL_API
.
So my first guess would be to try changing that to -DCIMGUI_IMPL_API='extern "C" __declspec(dllexport)'
and see if that fixes things (as you're not exporting backend functions you might want to use CIMGUI_API
instead, although in this situation I don't think it would actually matter).
@ShironekoBen Thank you so much.
I replaced (for linux)
-DIMGUI_IMPL_API=extern"C" \
with
-DCIMGUI_API='extern "C"'
and (for windows)
-DIMGUI_IMPL_API='extern "C" __declspec(dllexport)'
with
-DCIMGUI_API='extern "C" __declspec(dllexport)'
And now my dll looks like this
Btw, can my project be included in Software using Dear Bindings
because now it actually compiles correctly and I've just managed to run a example_null
sample in .NET8
Cool, glad to hear that worked! I've added an entry to the wiki page for your project. Just shout if there's anything else I might be able to help with!
Hi, first thing I should say is thank you for this project.
I'm currently working on generating bindings for dotnet.
I'm not a C++ developer in any way, so I kinda worked my way through original cimgui trying to copy-paste some steps.
Here's a problem I have - after building the generated definitions, dll explorer gives me a ton of
which differs from ![image](https://github.com/dearimgui/dear_bindings/assets/44116740/5d3cc3d6-d188-4b52-9afc-b2e2a90f5f6a)
_Z*
functions:cimgui.dll
build fromcimgui
repo, where dll explorer gives only functionsig*
and nothing more:I suppose that I have compiled this repo in some weird manner, and that produced all that junk in the resulting dll.
Here is a .Dockerfile I use to compile this repo for windows and linux https://github.com/DearImGuiBindingsNet/DearImGuiBindingsNet/blob/master/dear_bindings.Dockerfile if you wish to try it out - use commands in the readme.
I'm seeking some help in using gcc to produce the best result (without junk).
Thanks everyone in advance.