Paolo Molaro wrote:
If you need to access managed code from C++ using mono, the
embedding interface is the right way to do it, wrappers like
cilc can help to provide a nicer interface.
If you need to access C++ code from mono you currently
need to provide C wrappers that can be pinvoked: it's not
unlikely, though, that an enterprising contributor or a
skilled student would enhance mono so that it can use C++
directly with a simple attribute set on a class (maybe
also generating the class automatically by parsing the C++ header files).


Take a look at SWIG http://www.swig.org. It parses existing C++ header files and generates C# proxy classes to access the unmanaged code from any .net language via C/PInvoke calls. The resulting code can be compiled by any of the C# compilers and is cross-platform, so isn't tied to just the MS or mono tools/environment.

William
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to