ClangSharp
ClangSharp copied to clipboard
Clang bindings for .NET written in C#
For the `get` - "Cannot cast expression of type `int` to `bool`" For the `set` - "Cannot apply operator `&` to operands of type `bool` and `int`. Here's the relevant...
Would be nice to be able to get bindings for `extern` global variables. Apple's C APIs contain quite a lot of these; for example: ```C typedef const struct __CFAllocator *...
C header: ```C typedef struct Point { int x; int y; } Point; Point MyGlobalPoint = { .x = 10, .y = 20 }; ``` produces these C# bindings (missing...
It would be useful for downstream projects (like Win32Metadata) for ClangSharp to mark types generated from `typedef struct` with an attribute to indicate what the alternative names for that struct...
Found when reviewing my code using the generator:  It increases the risk to accidentally expose personal information. It's also painful when the C source location isn't fixed.
ClangSharpPInvokeGenerator will currently only expose an `int` indexer for its generated `_e__FixedBuffer` types. This creates an inconsistency with normal fixed buffers, necessitating casts if the field is not able to...
Let's say i have a source code hello-world.cpp: ``` #include int add(int a, int b) { int c = a + b; return c; } int main() { std::cout =...
In case if I remap the function pointer type, ClangSharpPInvokeGenerator uses remapped typename instead of `IntPtr` at the place where function pointer type is used within the C code. As...
I'm getting System.TypeInitializationException when running the tool. Initially I could not even run the tool after installing with command: ```sh dotnet tool install --global ClangSharpPInvokeGenerator --version 15.0.0 ``` I had...
See https://github.com/microsoft/win32metadata/issues/547.