[Mono-dev] Mono

Jonathan Pryor jonpryor at vt.edu
Thu Oct 20 07:08:20 EDT 2005


On Wed, 2005-10-19 at 12:05 -0700, Zymmeral wrote:
> When will there be a C++ compiler for Mono?

The Mono team isn't working on a C++ compiler, and likely never will.

So the answer to your question depends on what features you want.

If you want C++/CLI support for pure-IL assemblies, there will be "a C++
compiler for Mono" in ~1.5 months, called "Visual Studio.NET 2005."  In
theory, pure-IL C++/CLI apps should run unchanged under Mono, though I
haven't heard of too many people actually trying this.

If you want C++/CLI support for mixed-mode assemblies (single .dll/.exe
files containing both managed and unmanaged code), there are bigger
problems -- such as the complete lack of support for mixed-mode
assemblies within Mono.  I'm not sure if this will ever be "corrected,"
as supporting them would virtually require copying all of /lib/ld.so
into Mono.

(On Win32, Mixed-mode assemblies work because assemblies are PE files,
and normal .DLL files are PE files, so .NET can just
LoadLibrary()/GetProcAddress() the assemblies to get the native methods.
The normal OS Library Loader helps immensely.  Linux is different, as
ELF is the shared library format, not PE, so you can't
dlopen(3)/dlsym(3) the mixed-mode assembly, meaning that to properly
support mixed-mode assemblies in Mono you'd have to replicate most of
the work of /lib/ld.so for use on PE files.  See also the Wine project.
Plus, you won't ever be able to use a Win32-compiled mixed-mode assembly
on Linux, ever, because of differences in shared library names, exports,
etc.)

If you want a Free C++/CLI compiler for Mono, you may be waiting awhile.
I've heard of various efforts over the years, but it's been awhile since
I've heard anything at all.

 - Jon





More information about the Mono-devel-list mailing list