This question has been asked before, but I never found a truly satisfying solution -
I have a class library written in C#, and I want to call it from a legacy native C++ application. The host application is truly native, compiled on Windows & Linux, its a console application. So how can I make it call the C# class library, assuming using Microsoft .NET on Windows, and Mono on Linux.
I have looked at SWIG and wrapping with COM interfaces on Windows, but is there a standard recognized solution that works cross platform? i.e. that is generic, works with both Microsoft .NET and Mono, a write once use everywhere implementation.
Solutions should expose the full class interfaces from the C# domain to the C++ domain.
Similar questions focus only on the Windows solutions, for example -