C # call from native C ++, without / clr or COM?

This question has been asked before, but I never found a really satisfying solution -

I have a class library written in C # and I want to name it from an outdated C ++ application. The host application is indeed native, compiled on Windows and Linux, a console application. So, how can I get it to call the C # class library, assuming using Microsoft.NET on Windows and Mono on Linux.

I looked at SWIG and wrapped the COM interfaces in Windows, but is there a standard recognized solution that works on a cross platform? those. is common, it works with both Microsoft.NET and Mono, once they use the function of local use.

Solutions should expose full-class interfaces from the C # domain to the C ++ domain.

Similar questions apply only to Windows solutions, for example -

Calling C # methods from C ++ without using COM

+7
c ++ c # cross-platform mono
source share
1 answer

If you want to make this cross platform, I would recommend using the 100% Mono approach.

Mono has a clean embed API that works on Linux and Windows.

+5
source share

All Articles