[Mono-list] Managed C++ assemblies and Mono
Thu, 9 Jan 2003 10:56:45 +0100
I agree that it would be an interesting project, but I think it would be of
limited value. Here is an example of why: The SWT native DLL exposes a set
of functions with JNICALL calling convention, on Windows JNICALL is defined
as __stdcall and on Solaris (and presumable Linux as well) as default (i.e.
C) calling convention. If I compile my Managed C++ JNI DLL on Windows with
Microsofts compiler, the calling convention used for native code will
obviously be __stdcall, so this dll will not be usable on Linux, because the
Linux SWT native dll exports its functions with the C calling convention
(and call the JNI functions with the C calling convention).
> -----Original Message-----
> From: Miguel de Icaza [mailto:email@example.com]
> Sent: Wednesday, January 08, 2003 18:54
> To: Jeroen Frijters
> Cc: 'Patrick Hartling'; firstname.lastname@example.org
> Subject: RE: [Mono-list] Managed C++ assemblies and Mono
> > It's unlikely you're going to get this to work. The C++ runtime
> > initialization that the Managed C++ compiler links in is
> x86 code that
> > depends on the Windows API, so it'll be hard to get it to
> run on Linux.
> As long as it is only the initialization code, the few
> routines that are
> used can be faked, so that should be no problem.
> The large body of work though would be to make Mono able to
> execute the
> native x86 code. It would be an interesting project for someone
> interested in this, and many people would appreciate it.
> It is not a priority for us (Ximian) to make this happen at
> this point,
> as native x86 code is not portable to other systems, so we
> rather assume
> it is just an Intel hack.