[Mono-devel-list] C++/CLI and .NET 2.0

Jonathan Pryor jonpryor at vt.edu
Thu Jul 1 07:14:26 EDT 2004


On Thu, 2004-07-01 at 01:43, Cesar Mello wrote:
> Will it be possible some day to run programs made with C++/CLI
> targeting "pure CLR" for .NET 2.0 in Mono? 

It should be possible now, assuming a compatible generics
implementation.  If you don't use C++/CLI generics, then it should work
on existing Mono and .NET, unless you use the .NET 2.0 libraries...

I assume it's possible to use the .NET 1.1 libraries from C++/CLI.

> And will it be possible to
> use classes made in C++/CLI from C# programs in Mono?

Yes, given the restrictions above.

>  I am trying
> Visual Studio Express beta and found curious the "pure CLR" option and
> how it could impact the use of C++ in Mono.

You might want to read:

	http://msdn.microsoft.com/msdnmag/issues/04/05/VisualC2005/default.aspx

There's the /clr:pure flag:

        The new /clr:pure compiler flag instructs the compiler to
        generate a pure managed image with no native constructs.

And the /clr:safe flag:

        This is the holy grail of verifiability for C++ developers.
        Throwing this switch causes the compiler to ensure that the
        generated assembly is completely verifiable; any unverifiable
        constructs will result in a compile-time error.

Both of these should permit C++/CLI code to run under Mono.  Anything
else won't, as native code could (will?) be embedded in the assembly,
which Mono can't handle.

 - Jon





More information about the Mono-devel-list mailing list