[Mono-winforms-list] Still can't get winforms to work

jba-mono@optusnet.com.au jba-mono@optusnet.com.au
Wed, 29 Sep 2004 09:21:54 +1000


Paul,

I had the same problem, this is how I fixed it.

For some reason 'make install' in
mcs/class/Managed.Windows.Forms/ assumes that
your prefix is /usr/local regardless of what it is.

I had my prefix set as /usr and thought I
installed the MWF dll, but noticed the last line
(the one using gacutil) actually installs the dll
to /usr/local/lib/mono/gac.

This is the wrong place.

I work around this problem by copying that last
line of make instal (the gacutil line) and
changing the /usr/local part in it to /usr.

then instead of running make install, i just
re-run that gacutil line everytime i want to
install an updated version of the dll.

Not sure if it's the right way to do it, but it
works for me.

JBA



> Paul <paul@all-the-johnsons.co.uk> wrote:
> 
> Hi,
> 
> > > Unhandled Exception:
System.TypeInitializationException: An 
> exception
> > > was thrown by the type initializer for
System.Windows.Forms.Control 
> --->
> > > System.TypeInitializationException: An
exception was thrown by the 
> type
> > > initializer for System.Windows.Forms.Win32
---> System.
> > > DllNotFoundException: winelib.exe.so
> > 
> >   This error is not in current CVS. Either
you have not compiled and
> > installed current CVS mono OR you have two
mono's installed. Try 
> 'which
> > mono' and make sure it is the same as your
--prefix when building.
> 
> which mono shows /usr/bin/mono, which is
correct as that's where I set
> it for the prefix.
> 
> I originally thought I had not removed the
original rpms, but I had. 
> CVS
> was fresh built this afternoon.
> 
> > > in <0x00050> (wrapper managed-to-native) 
> System.Windows.Forms.Win32:
> > > WineLoadLibrary (string)
> > > <in 0x00390>
System.Windows.Forms.Win32:.cctor ()
> > > 
> > > Is it likely that I have something
somewhere which is causing mono 
> to
> > > bork when being called? I can't see
anything in /usr/local/lib 
> which
> > > would cause the problem.
> > 
> >   What about in /usr/local is there a mono in
there?
> 
> No. I thought that was the problem.
> 
> One thing I did notice when running strace was
that mono was
> accessing /usr/lib/mono/1.0. When I looked,
there was a 1.0 directory
> (with symlinks to gac/1.0) and a 2.0 directory.
Is this correct?
> 
> TTFN
> 
> Paul
> -- 
> Homer: Donut? 
> Lisa: No, thanks. Do you have any fruit? 
> Homer: This has purple stuff inside. Purple is
a fruit.