Embedding MS.NET C# into c/c++ (like mono)

4.5k Views Asked by At

Is it possible to embed the MS C# compiler into an umanaged c/c++ host application and make both languages interoperate, very much like Mono does this (like here and here)?
I have a working implementation of this für my Qt based C++ Application using mono, but I'm limited (I really need the memory) by the 32bit constraint of mono on Windows (there are no 64bit releases for windows). So can this be achived with "the original" C# implementation?

BTW: I'd like to continue using GNU compilers (mingw-w64).

2

There are 2 best solutions below

2
Stephen Cleary On BEST ANSWER

Microsoft does support this; their term for it is hosting.

1
Lex Li On

If you specifically want to use C# compiler, then Mono's C# compiler is managed, while Microsoft's C# compiler is native. There are some differences you cannot conquer.