[Mono-list] Mono Winforms on Linux

gutolinux gutolinux@uol.com.br
Sat, 2 Apr 2005 13:39:12 -0300


Hi all, 
 
I'm just trying to test mono winforms on linux by the 
following example: 
 
class HelloWindowsForms 
{ 
    static void Main() 
    { 
        System.Windows.Forms.MessageBox.Show("Welcome to 
the bill free zone."); 
    } 
} 
 
and run in a terminal,and got this error: 
 
guto@linux:~> mcs 
teste.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll 
guto@linux:~> mono teste.exe 
Mono System.Windows.Forms Assembly [Revision: 41731; 
built: 2005/2/15 5:56:12] 
 
Unhandled Exception: System.TypeInitializationException: 
An exception was thrown by the type initializer for 
System.Windows.Forms.XplatUI ---> 
System.DllNotFoundException: libX11 
in (wrapper managed-to-native) 
System.Windows.Forms.XplatUIX11:XInitThreads () 
in <0x0007b> System.Windows.Forms.XplatUIX11:.ctor () 
in <0x00043> System.Windows.Forms.XplatUIX11:GetInstance 
() 
in <0x00059> System.Windows.Forms.XplatUI:.cctor ()--- End 
of inner exception stack trace --- 
 
in <0x00000> <unknown method> 
in <0x0004b> System.Windows.Forms.Form:get_CreateParams () 
in <0x0003c> 
System.Windows.Forms.MessageBox+MessageBoxForm:get_CreateParams 
() 
in <0x00211> System.Windows.Forms.Control:.ctor () 
in <0x00011> System.Windows.Forms.ScrollableControl:.ctor 
() 
in <0x0000c> System.Windows.Forms.ContainerControl:.ctor 
() 
in <0x00010> System.Windows.Forms.Form:.ctor () 
in <0x00013> 
System.Windows.Forms.MessageBox+MessageBoxForm:.ctor 
(IWin32Window owner, System.String text, System.String 
caption, MessageBoxButtons buttons, MessageBoxIcon icon) 
in (wrapper remoting-invoke-with-check) 
MessageBoxForm:.ctor 
(System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.Mes=
sageBoxButtons,System.Windows.Forms.MessageBoxIcon) 
in <0x0002b> System.Windows.Forms.MessageBox:Show 
(System.String text) 
in <0x0000c> HelloWindowsForms:Main () 
guto@linux:~>      
 
Does anybody knows what is it ? 
 
Thanks! 
 
Gutemberg Vieira =0A =0A_________________________________________________=
_________________________=0AAcabe com aquelas janelinhas que pulam na sua=
 tela.=0AAntiPop-up UOL - =C9 gr=E1tis!=0Ahttp://antipopup.uol.com.br/=0A=