Handling the Function, PointerType, Typedef, FundamentalType, CvQualifiedType XML nodes

32 views
Skip to first unread message

Jonx

unread,
Jan 11, 2012, 12:22:35 PM1/11/12
to mono-cxxi
Hi,

Note that I don't really know how to program in C/C++... All I want is
be able to generate a C# wrapper for one of our C/C++ library.

Is it me or it's just handling classes, structs, namespaces and
enumerations?

Is this due to the fact that my code is C and not C++? For example, I
got those nodes in my generated XML:
Function, PointerType, Typedef, FundamentalType, CvQualifiedType...

Is someone working on this? Is it planned? I would like to help but I
don't have the required skills for that...

Any hints about where to start?

Thank you for your help,
John.

Alex Corrado

unread,
Jan 11, 2012, 1:30:18 PM1/11/12
to mono...@googlegroups.com
Hey John,

Is it me or it's just handling classes, structs, namespaces and
enumerations?

For the initial design, we aimed to wrap a basic, object-oriented subset of C++. There is not yet support for any functions that aren't instance or static methods of a class. If they are extern "C" you can call them directly through P/Invoke. If they are not, there might be the possibility of generating the correct P/Invoke using CppAbi.GetMangledMethodName.
 
Is someone working on this? Is it planned? I would like to help but I
don't have the required skills for that...

It's definitely a feature that would be nice. I personally wouldn't have time to work on it for a few months, as I still need to complete the work I've been doing to improve the Itanium name mangling implementation and write some tests.

Any hints about where to start?

If you can, make the functions extern "C" and call them through P/Invoke. If that's not an option, you might take a look at CppAbi.GetMangledMethodName. If you end up feeling adventurous and hack up a patch, I would certainly take a look.

Best,
Alex

Jonx

unread,
Jan 11, 2012, 4:35:20 PM1/11/12
to mono-cxxi
Thanks Alex, I'll give it a try before turning to P/Invoke...
I'll let you know...
John.
Reply all
Reply to author
Forward
0 new messages