[mono-vb] Compiling dificulties
   
    Mauricio Henriquez
     
    buho-1@entelchile.net
       
    Thu, 20 May 2004 11:45:39 -0400
    
    
  
This is a multi-part message in MIME format.
--Boundary_(ID_0YBNNBEOGOH7qAts6nqyeA)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Hi to all:
    I new in the list, my name is Mauricio Henriquez and I write you from Chili.
    Recently I try the "mono-0.31" proyect in my Fedora linux, I install the RPM's from the "go-mono" web site and I need some basic points to correctly compile my applications. For example, where or what "path" I have to put in my linux system to find the correct DLL's??
    I also install the "MonoDevelop" and I write and run correctly some basic C#--Gtk and C#-Windows.Forms examples, but yesterday I try to write my first mono-VB example with Gtk (I can run this VB-Gtk example in Windows with VS .NET and is from the mono web site) and use the VB-mono command line compiler, but I have to do this first:
$ export MONO_PATH=/usr/lib/mono
..and then..
$ mbas gtk.vb -r gtk-sharp
 Compilation succeded
....where can I put the "MONO_PATH" in the "profile" files???
I have the "gtk.exe", but when I try to run the program...
$ mono gtk.exe
Unhandled Exception: System.DllNotFoundException: libgtk-win32-2.0-0.dll
in <0x0053> (wrapper managed-to-native) Gtk.Application:gtk_init (int&,intptr&)
in <0x00038> Gtk.Application:Init ()
in <0x00014> GtkTest:Main ()
    
Any ideas??
The code is very simple, is only for a test:
Imports System
Imports Gtk
Module GtkTest
 Sub Main()
  Dim Win as Window
  Dim Btn as Button
  Application.Init ()
  Win = new Window ("VB .NET Gtk+ en Linux!!!")
  Btn = new Button ("Apretame")
  Win.Add (Btn)
  Win.ShowAll ()
  Application.Run ()
 End Sub
End Module
With "mono" in Windows I can't even compile the code, I get this terrible message:
C:\Archivos de programa\Mono-0.31\bin>mbas gtk.vb -r gtk-sharp
Unhandled Exception: System.IO.FileNotFoundException: File or assembly name Mono
.GetOptions, or one of its dependencies, was not found.
File name: "Mono.GetOptions"
Fusion log follows:
=== Pre-bind state information ===
LOG: DisplayName = Mono.GetOptions, Version=1.0.2003.1014, Culture=neutral, Publ
icKeyToken=null
 (Fully-specified)
LOG: Appbase = C:\Archivos de programa\Mono-0.31\bin\
LOG: Initial PrivatePath = NULL
Calling assembly : mbas, Version=0.29.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: Application configuration file does not exist.
LOG: Policy not being applied to reference at this time (private, custom, partia
l, or location-based assembly bind).
LOG: Post-policy reference: Mono.GetOptions, Version=1.0.2003.1014, Culture=neut
ral, PublicKeyToken=null
LOG: Attempting download of new URL file:///C:/Archivos de programa/Mono-0.31/bi
n/Mono.GetOptions.DLL.
LOG: Attempting download of new URL file:///C:/Archivos de programa/Mono-0.31/bi
n/Mono.GetOptions/Mono.GetOptions.DLL.
LOG: Attempting download of new URL file:///C:/Archivos de programa/Mono-0.31/bi
n/Mono.GetOptions.EXE.
LOG: Attempting download of new URL file:///C:/Archivos de programa/Mono-0.31/bi
n/Mono.GetOptions/Mono.GetOptions.EXE.
But the same code (and others C# examples) with VS .NET run perfectly.
Why?? What is my mistake??
By the way I run correctly with "mono" on linux a very simple VB .NET aplication with a Windows.Form!!!, that work!!??!!?? but the .exe was compiled in VS .NET on Windows.
Ideas??, suggestions??, tips??, link??, black magic???, pray's???
Thanks
Mauricio.
--Boundary_(ID_0YBNNBEOGOH7qAts6nqyeA)
Content-type: text/html; charset=iso-8859-1
Content-transfer-encoding: 7BIT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Hi to all:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>    I new in the list, my name is 
Mauricio Henriquez and I write you from Chili.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>    Recently I try the "mono-0.31" 
proyect in my Fedora linux, I install the RPM's from the "go-mono" web site and 
I need some basic points to correctly compile my applications. For example, 
where or what "path" I have to put in my linux system to find the correct 
DLL's??</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>    I also install the "MonoDevelop" 
and I write and run correctly some basic C#--Gtk and C#-Windows.Forms examples, 
but yesterday I try to write my first mono-VB example with Gtk (I can run this 
VB-Gtk example in Windows with VS .NET and is from the mono web site) and 
use the VB-mono command line compiler, but I have to do this first:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$ export MONO_PATH=/usr/lib/mono</FONT></DIV>
<DIV> </DIV>
<DIV>..and then..</DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>$ mbas gtk.vb -r gtk-sharp</FONT></DIV>
<DIV><FONT face=Arial size=2> Compilation succeded</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>....where can I put the "MONO_PATH" in the 
"profile" files???</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have the "gtk.exe", but when I try to run the 
program...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$ mono gtk.exe</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Unhandled Exception: System.DllNotFoundException: 
libgtk-win32-2.0-0.dll</FONT></DIV>
<DIV><FONT face=Arial size=2>in <0x0053> (wrapper managed-to-native) 
Gtk.Application:gtk_init (int&,intptr&)</FONT></DIV>
<DIV><FONT face=Arial size=2>in <0x00038> Gtk.Application:Init 
()</FONT></DIV>
<DIV><FONT face=Arial size=2>in <0x00014> GtkTest:Main ()</FONT></DIV>
<DIV><FONT face=Arial size=2>    </FONT></DIV>
<DIV><FONT face=Arial size=2>Any ideas??</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The code is very simple, is only for a 
test:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Imports System<BR>Imports Gtk</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Module GtkTest<BR> Sub 
Main()<BR>  Dim Win as Window<BR>  Dim Btn as 
Button</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>  Application.Init ()<BR>  Win 
= new Window ("VB .NET Gtk+ en Linux!!!")<BR>  Btn = new Button 
("Apretame")<BR>  Win.Add (Btn)<BR>  Win.ShowAll 
()<BR>  Application.Run ()<BR> End Sub<BR>End Module</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>With "mono" in Windows I can't even compile the 
code, I get this terrible message:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>C:\Archivos de programa\Mono-0.31\bin>mbas 
gtk.vb -r gtk-sharp</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Unhandled Exception: 
System.IO.FileNotFoundException: File or assembly name Mono<BR>.GetOptions, or 
one of its dependencies, was not found.<BR>File name: 
"Mono.GetOptions"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Fusion log follows:<BR>=== Pre-bind state 
information ===<BR>LOG: DisplayName = Mono.GetOptions, Version=1.0.2003.1014, 
Culture=neutral, Publ<BR>icKeyToken=null<BR> (Fully-specified)<BR>LOG: 
Appbase = C:\Archivos de programa\Mono-0.31\bin\<BR>LOG: Initial PrivatePath = 
NULL<BR>Calling assembly : mbas, Version=0.29.0.0, Culture=neutral, 
PublicKeyToken=null.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>===</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>LOG: Application configuration file does not 
exist.<BR>LOG: Policy not being applied to reference at this time (private, 
custom, partia<BR>l, or location-based assembly bind).<BR>LOG: Post-policy 
reference: Mono.GetOptions, Version=1.0.2003.1014, Culture=neut<BR>ral, 
PublicKeyToken=null<BR>LOG: Attempting download of new URL <A 
href="file:///C:/Archivos">file:///C:/Archivos</A> de 
programa/Mono-0.31/bi<BR>n/Mono.GetOptions.DLL.<BR>LOG: Attempting download of 
new URL <A href="file:///C:/Archivos">file:///C:/Archivos</A> de 
programa/Mono-0.31/bi<BR>n/Mono.GetOptions/Mono.GetOptions.DLL.<BR>LOG: 
Attempting download of new URL <A 
href="file:///C:/Archivos">file:///C:/Archivos</A> de 
programa/Mono-0.31/bi<BR>n/Mono.GetOptions.EXE.<BR>LOG: Attempting download of 
new URL <A href="file:///C:/Archivos">file:///C:/Archivos</A> de 
programa/Mono-0.31/bi<BR>n/Mono.GetOptions/Mono.GetOptions.EXE.<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>But the same code (and others C# examples) with VS 
.NET run perfectly.</FONT></DIV>
<DIV><FONT face=Arial size=2>Why?? What is my mistake??</FONT></DIV>
<DIV> </DIV>
<DIV>By the way I run correctly with "mono" on linux a very simple VB .NET 
aplication with a Windows.Form!!!, that work!!??!!?? but the .exe was compiled 
in VS .NET on Windows.</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Ideas??, suggestions??, tips??, link??, black 
magic???, pray's???</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Mauricio.</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT></FONT></DIV></BODY></HTML>
--Boundary_(ID_0YBNNBEOGOH7qAts6nqyeA)--