[Mono-devel-list] Re: C++/CLI binary portability II

Rafael Teixeira monoman at gmail.com
Sat Aug 14 20:39:46 EDT 2004


First, Mono's implementation of System.Windows.Forms is not ready, you
should have read the release notes for Mono 1.0 (Mono's implements
most of .NET 1.1, but not all).

<free.advice>
A good rule of thumb is to read the release notes for any software
before trying to use it.
</free.advice>

Second, your error message seems to say that the constructor for some
metadata Attribute could not be found, not the Form class constructor.
You´ll need dig a bit deeper to find out which one is missing.

But as you are using VC++ 2005 Express Beta 1, which installs/uses a
beta version of .NET 2.0, it is surely not a surprise that many
classes may be missing/incompatible.

As someone already pointed in your other thread of messages, many
classes needed for Visual C++.NET programs are being relocated from an
assembly (Microsoft.VisualC.dll) to another (mscorlib), but currently
none of those classes are implemented in Mono.

Are you sure you can't try to use C# instead of C++, it is a better
supported language in mono, as we develop almost all of our managed
code (class libraries and utilities) in it. As a developer with years
of experience in both languages, I prefer C# over C++(.NET
 or not) 100% of the time...


----- Original Message -----
Wrom: SKVFVWRKJVZCMHVIBGDADRZFSQHYU
Date: Sat, 14 Aug 2004 04:01:48 +0300
Subject: [Mono-devel-list] Re: C++/CLI binary portability II
To: mono-devel-list <mono-devel-list at lists.ximian.com>

 I pasted a wrong thing, so I repost:
 
 
 
 
 After managing to run successfully the console hello world program
under Mono 1.0 which was compiled with VC++ 2005 Express Beta 1, I
tried to make a GUI one with a Form, a TextBox and a Button. However
the .exe under Mono produces the following error:
 
 
 

root at chrome root]# mount /mnt/cdrom
 [root at chrome root]# cd /mnt/cdrom
 [root at chrome cdrom]# mono temp.exe
 
 ** (temp.exe:1412): WARNING **: Missing method .ctor in assembly
/mnt/cdrom/temp.exe typeref index 34
 
 ** ERROR **: Can't find custom attr constructor image:
/mnt/cdrom/temp.exe mtoken: 0x0a00002d
 aborting...
 Aborted
 [root at chrome cdrom]#
 


 


 The ILDASM on the .exe reveals a method .ctor : void() in the class
temp.Form1. I guess it is a default constructor or something.
 
 When I double click on that method I get a second window with the
following information about that method:
 
 
 ..method public specialname rtspecialname 
         instance void  .ctor() cil managed
 {
   // Code size       13 (0xd)
   .maxstack  1
   IL_0000:  ldarg.0
   IL_0001:  call       instance void
[System.Windows.Forms]System.Windows.Forms.Form::.ctor()
   IL_0006:  ldarg.0
   IL_0007:  call       instance void temp.Form1::InitializeComponent()
   IL_000c:  ret
 } // end of method Form1::.ctor
 
 
 
 
 <>The .exe was compiled with /clr:safe. Mono 1.0 is used. Any ideas
on how to fix/bypass the problem?
 
 
 
 
 
 
 Best regards,
 
 Ioannis Vranos 
 _______________________________________________ Mono-devel-list
mailing list Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list



-- 
Rafael "Monoman" Teixeira
---------------------------------------
Cognition is not a representation of an objectively existing world
but is a bringing forth of a world in the process of living.
-- Fritjof Capra, citing 
   Humberto Maturana and Francisco Varella's "Santiago Theory of Cognition"



More information about the Mono-devel-list mailing list