[Mono-devel-list] Issue of binary portability of a hello worl d application
Rob.Tillie at Student.tUL.EDU
Rob.Tillie at Student.tUL.EDU
Sun Aug 8 04:38:52 EDT 2004
I believe managed C++ adds some native code to the program. Perhaps if you
look to the IL it becomes clear what the thing is doing (use ildasm).
Greetz,
-- Rob.
_____
From: Ioannis Vranos [mailto:ivr at grad.com]
Sent: Sunday, August 08, 2004 10:25 AM
To: mono-devel-list
Subject: Re: [Mono-devel-list] Issue of binary portability of a hello worl d
application
Actually I did not use any managed C++ which also should be no problem by
itself, since does not use native code but is for CLI things like
// Reference type
__gc class whatever
{
// ...
};
// Value type
__value class whatever
{
// ...
};
These are pure CLI types. But probably the problem is the mscorlib.dll. In
what "dll" Console::WriteLine is included in Mono?
Best regards,
Ioannis Vranos
Rob.Tillie at Student.tUL.EDU <mailto:Rob.Tillie at Student.tUL.EDU> wrote:
Hey Ioannis,
Managed C++ is not supported on Mono, and thus it is not binary compatible.
As you can see in your error, it tries to invoke some C++ code using
pinvoke.
So, it always will be binary compatible, unless the language you use uses
pinvoke, like managed C++. (or you use it yourself).
Greetz,
-- Rob.
_____
From: Ioannis Vranos [mailto:ivr at grad.com <mailto:ivr at grad.com> ]
Sent: Sunday, August 08, 2004 2:37 AM
To: mono-devel-list
Subject: [Mono-devel-list] Issue of binary portability of a hello world
application
Hello fellow developers. I just installed Mono the hard way in White Box 3
Respin 1 GNU/Linux (a Red Hat variant) because I want to experiment with
binary portability between .NET and Mono.
I created a simple CLI hello world program with current C++ "Managed
Extensions" in VS 2003 and these are the contents of the main .cpp file:
#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
int _tmain()
{
Console::WriteLine(S"Hello World");
return 0;
}
Well when I run the executable in GNU/Linux using mono Manage.exe I get the
error:
** ERROR **: file marshal.c: line 3096 (mono_marshal_get_native_wrapper):
assertion failed: (method->signature->pinvoke)
aborting...
Aborted
Well it is obvious that an assert condition in Mono's code is violated (why
is it compiled in debug mode?). But why is it happening, any ideas? (apart
from the fact that assert failure indicates a bug if it is used as it is
supposed to).
Best regards,
Ioannis Vranos
_______________________________________________ Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com <mailto:Mono-devel-list at lists.ximian.com>
http://lists.ximian.com/mailman/listinfo/mono-devel-list
<http://lists.ximian.com/mailman/listinfo/mono-devel-list>
_______________________________________________ Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040808/4cdbdd26/attachment.html
More information about the Mono-devel-list
mailing list