You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This shouldn't be difficult to fix, there's likely just a context being passed down incorrectly somewhere.
C++ bindings in general, especially as you get into more complex type definitions, are tricky and Clang doesn't always consistently surface the AST information in a way that makes it trivial to resolve.
When using nested types as method parameters, the type is not fully declared leading to syntax errors in the C# code. A reproduction is as follows:
USER@PC MINGW64 /c/Develop/prv/ $ ClangSharpPInvokeGenerator.exe --file bug/bug.h --output bug/output -n Bug Processing 'bug/bug.h' USER@PC MINGW64 /c/Develop/prv/ $ ClangSharpPInvokeGenerator --version ClangSharp P/Invoke Binding Generator version 18.1.3 clang version 18.1.3 (https://github.com/llvm/llvm-project c13b7485b87909fcf739f62cfa382b55407433c0) clangsharp version 18.1.3
leads to
where Method should be declared as
public void Method([NativeTypeName("A::Inner &")] A.Inner* inner)
.A possible workaround is to use
--remap A::Inner=AInner
and to add an own C# file with the contentsglobal using AInner = Bug.A.AInner;
The text was updated successfully, but these errors were encountered: