New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating minimal unsafe bindings for pure C lib #989
Comments
That's not possible so far I know.
Am 20.10.2017 02:58 schrieb "raizam" <notifications@github.com>:
… I have a pure C library with structs and function.
I just want to generate minimal bindings without any encapsulation and
handle the higher level myself.
I'm looking for this kind of layout:
public static class ModuleName
{
public static unsafe extern CFunction(ref byte* ptr);
}
Having read the availlable docs, it's not clear to me how to achieve this
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#989>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYPM8JJXGOCK8RdXC6pZ1tKAFhDB5Aaqks5st_AugaJpZM4QADca>
.
|
@raizam I am not sure what the problem here is. You get more types in your bindings than you need? |
The problem is that everything gets encapsulated in class Internal. This is a low level C library and I don't want to get high level C# implementation. And strangely the generated binding shows some mangled c++ functions names while there aren't any. Anyway...don't bother with this, I'm writing my own parser dedicated for this library |
You can easily extend CppSharp to get this functionality. We've had some requests over the years for this and would gladly add it, but so far no one has contributed an actual PR for it. |
I have a pure C library with structs and functions.
I just want to generate minimal bindings without any encapsulation and handle the higher level myself.
I'm looking for this kind of layout:
internal static class ModuleName
{
[DllImport( CallingConvention = CallingConvention.Cdecl)]
internal static unsafe extern CFunction(ref byte* ptr);
}
Having read the availlable docs, it's not clear to me how to achieve this
The text was updated successfully, but these errors were encountered: