[mono-vb] projects do work fine on windows, but I can't get it compiled on my MAC :-(

Rolf Bjarne Kvinge rolflists at ya.com
Mon Feb 11 05:20:01 EST 2008


It looks like you haven't installed winforms correctly (or aren't using it
correctly), or a more general mono problem.

There are several things you can try out in order to narrow down the cause:

Try putting System.Console.WriteLine ("Hello world") in your Main and
compile with -target:exe instead of winexe. If this works, then it's a
winforms problem, and you should ask in the mono-winforms list.

If it doesn't work, rewrite the same sample in C# and compile with mcs. If
this doesn't work, then it's a more general mono problem, and you should ask
in the mono list.

(more notes inline)

>From: mono-vb-bounces at lists.ximian.com
[mailto:mono-vb-bounces at lists.ximian.com] On Behalf Of Kris Wauters
>Sent: domingo, 10 de febrero de 2008 15:08
>To: mono-vb at lists.ximian.com
>Subject: [mono-vb] projects do work fine on windows, but I can't get it
compiled on my MAC :-(
>Hello all,
>I recently started with mono. (I tried it a few years ago, but only console
applications did work fine)
>As I understood from the documentation, it should be possible to run a
windows.forms application on
>other platforms ?
>I get my project compiled on my windows machine, but I can't get it to
compile/run on my MAC (tiger 10.4)
>What I tried:
>- Fired up VS2003, created a module1.vb with a "sub main", with a simple
>- I removed the "imports system,system reflection and
>from the assemblyinfo.vb
>- I only have system.data, system.drawing and system.windows.forms as
>- The application compiles and runs fine from with VS2003 (using .NET
framework 1.0)
>- I compiled it with vbnc on my windows machine, as following:
>VBNC module1.VB
>- The exe runs fine .
>- I then "moved" my whole folder to my MAC (tiger 10.4), where I also
installed mono.
>- I tried: mono test.exe, but I get all kinds of weird errors:
>(system.overflowexception, Number overflow, at (wrapper
>with some extra lines, all ending at [0x00000]

Posting the entire output would help in order to narrow down the failure.

>- Then, I tried to compile it on my MAC, with:
>VBNC module1.vb
-r:system.data.dll,system.drawing.dll,system.windows.forms.dll -out:test.exe
>This gives me 3 warnings about class Mono.WebBrowser.DOM.Idocument could
not be loaded,
>used in Mono.Mozilla, Version=
>(I don't see why I get this warnings, I don't use web-related things in my

System.Windows.Forms.dll has a WebBrowser class, and our implementation is
in a separate assembly (Mono.Mozilla), which you don't seem to have
installed on your mac. When the compiler loads System.Windows.Forms.dll it
has to load all the classes in that assembly, including the WebBrowser
class, which then fails.

Anyways an assembly compiled on another machine should work. 

>I also get an erro: VBNC99999: Unexpected error: the classed in the module
cannot be loaded,
>at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
>- I also tried to use the libpath etc, but I still think that I'm compiling
against 2.0 instead of 1.0
>on my MAC.

Vbnc can't compile against 1.0, only against 2.0.


More information about the Mono-vb mailing list