[Mono-list] Questions on the Mono roadmap
Paolo Molaro
lupus@ximian.com
Tue, 18 Jan 2005 20:28:36 +0100
On 01/18/05 Dallman, John wrote:
> * Managed C++ ;-) We will use this to create interfaces
Ugh. Managed C++ should be avoided if you want to port the code:
try to restrict its use as much as possible, so when you port you
can rewrite the small bit of work. The new CLI/C++ proposal
is not much better either, especially if you're interested in
64 bit platforms: it's designed to work only on braindamaged
64 bit archs with 32 bit longs (ie win64).
> to .NET code that can be called by native C code. There
> doesn't seem to be an equivalent of C++ 'extern "C"' in
> C#, so we haven't found a way to create C-callable
> functions in C#. It seems very unlikely that we'd be
> able to take a Managed C++ DLL from Windows onto a Mono
> platform and link C code against it successfully, so we
> need a way to build Managed C++ code on the Mono platform
> - or some other language that can provide C-callable
> interfaces and call C# code.
There is a tool that can be used to create C libraries
from assemblies automatically. It can probably be tweaked
to suit your needs (like create C++ classes instead of
C functions). See the mcs/tools/cilc dir in svn.
It's not yet clear how to keep it working when we'll have
a moving GC, though (in mono 2.0).
lupus
--
-----------------------------------------------------------------
lupus@debian.org debian/rules
lupus@ximian.com Monkeys do it better