DearImGui icon indicating copy to clipboard operation
DearImGui copied to clipboard

Upgrading to latest imgui and implot

Open aybe opened this issue 2 years ago • 2 comments

Upgrading to imgui 1.89.3 and latest implot does build fine but CppSharp is having a hard time generating the bindings:

Running DearImGui.Generator
Generation starting...
Generating for X86 in C:\Users\aybe\source\repos\DearImGui\DearImGui.Generator\bin\Debug\net6.0\X86\ImGui.cs...
Parsing libraries...
Parsing code...
Parsed 'imgui.h'
Processing code...
Removed 3 passes of type CppSharp.Passes.CheckIgnoredDeclsPass in PreprocessPasses
Removed 1 passes of type CppSharp.Passes.CleanCommentsPass in PreprocessPasses
Changed usage to 'InOut' for parameter 'mouse_pos' in function 'IsMousePosValid'.
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at DearGenerator.Library.Ignore(ASTContext ctx, String className, String memberName, IgnoreType ignoreType) in C:\Users\aybe\source\repos\DearImGui\DearGenerator\Library.cs:line 53
   at DearGenerator.Library.PreprocessIgnores(ASTContext ctx) in C:\Users\aybe\source\repos\DearImGui\DearGenerator\Library.cs:line 212
   at DearGenerator.Library.Preprocess(Driver driver, ASTContext ctx) in C:\Users\aybe\source\repos\DearImGui\DearGenerator\Library.cs:line 285
   at CppSharp.ConsoleDriver.Run(ILibrary library)
   at DearGenerator.CodeGenerator.Generate(String module, String sourceDirectory, String targetDirectory, CodeGeneratorFactory factory, CodeGeneratorTransform transform) in C:\Users\aybe\source\repos\DearImGui\DearGenerator\CodeGenerator.cs:line 352
   at DearGenerator.CodeGenerator.Generate(String module, String sourceDirectory, String targetDirectory, CodeGeneratorFactory factory, CodeGeneratorTransform transform) in C:\Users\aybe\source\repos\DearImGui\DearGenerator\CodeGenerator.cs:line 361
   at DearImGui.Generator.Program.Main() in C:\Users\aybe\source\repos\DearImGui\DearImGui.Generator\Program.cs:line 9
   at DearImGui.Generator.Program.<Main>()
Aborting, last command failed with error code -532462766

aybe avatar Feb 21 '23 06:02 aybe

It's erroring cause it's trying to ignore something that doesn't exist anymore it seems, commenting it out works. I managed to update it to latest ImGui, just had to comment a few ignore lines.

nitrog0d avatar Mar 04 '23 21:03 nitrog0d

Yep, thanks, fixed it 32cd37bd2d29897236f38af91c5687c3eaea3137, I've added you as co-author ofc 😁

aybe avatar Mar 08 '23 08:03 aybe