[Mono-list] mono support for C++

George Birbilis George Birbilis" <birbilis@kagi.com
Thu, 20 Jan 2005 19:39:47 +0200


make a .NET webservice for a MS VC++ compiler running on a Windows machine
and compile for .NET (IL) target. Resulting code should also run on mono (I
hope)

cons:
1) user has to trust your service to submit their code
2) can't use that offline
3) need highspeed connection if you rebuild too often
4) may need to have a server farm if your service becomes too popular

other idea (at least on Linux/Intel machines) might be WINE etc. in
combination with MSVC++ compiler with .net target

or a C++ to C# transcoder (OK, maybe without support for multiple 
inheritance)

>> Hi,
>> Just wanted to get some information on the plan for
>> supporting C++ on mono. Has work already started for
>> this?
>
> The current plan consists of this:
>
> 1. Point at C++ code
> 2. Say "Ha Ha" in Nelson's voice (from The Simpsons)
> 3. Profit!
>
> :-)
>
> Humor aside, there are no plans within Mono to support C++, at least
> that I've heard of.  Outside of Mono I can think of at least two
> different approaches:
>
> 1. Use a code generator such as SWIG that parses the C++ code and
>    generates C wrapper functions and C# code which DllImports the
>    C wrappers.
>
>    Pro: This permits use of C++ code from C#
>    Con: Not terribly elegant; Extra layer of C code may impact
>         performance.
>
> 2. There was work on a WHIRL-to-IL compiler, which would compile C
>    (and probably C++) into CIL which Mono could execute.
>
>    However, I haven't heard any news about this in awhile, so I
>    don't know if it's still being worked on.
>
> Long-term, GCC may be an option.  Since GCC is migrating to a SSA tree
> as an intermediate representation in GCC 4.0 (instead of the current
> register-based representation), it will be easier to modify GCC to
> support CIL output in the future.  Note, *easier*.  It may still be
> quite difficult, and I haven't actually heard of anyone interested in
> adding such support.  Pro: nearly any language GCC supports could
> produce CIL.  Maybe.  Con: Is anyone working on this?
>
> - Jon
>
>
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>