[Mono-winforms-list] Monostub for Wine SWF

Mike Hearn m.hearn@signal.qinetiq.com
12 Mar 2003 09:22:36 +0000

Apparently monostub is the best way to go for now. According to
Alexandre, there is no way you can initialise winelib after the program
has started, it has to be done by launching wine foo.exe.so:

"No, that's not supported at the moment, and it's a bit tricky to
implement. It may happen someday but it's not really a priority right

So, it looks like monostub is the way to go from here.

On pthreads, basically the issue is that Wine has to do some extra
legwork for some of the pthread functions, so it has its own internal
implementation. I think that means you need to have the libs that use
pthreads use the wine implementation instead, ie don't -lpthreads. The
wine implementation might need a bit of work, but it shouldn't be too

That does of course mean that libmono and libgc either have to have 2
versions, or need to load pthreads using dlopen() and then get the
symbols with dlsym(), so when you're not using wine the standard
implementation is used, and when you are, the symbols are taken from

On Mon, 2003-03-10 at 11:50, Alexandre Pigolkine wrote:
> The documentation is in the CVS:
> mcs/class/System.Windows.Forms/README
> Few lines from the file:
> monostub.exe.so - 
> The WineLib application that starts the Mono/WineLib application. This
> small WineLib application embeds the Mono JIT engine allowing any Mono
> application running in it access to WineLib/Win32 function calls. 
> I didn't know about suggestions. I will check them now.
> Thanks,
> Alexandre Pigolkine
> -----Original Message-----
> From: mono-winforms-list-admin@lists.ximian.com
> [mailto:mono-winforms-list-admin@lists.ximian.com] On Behalf Of Mike
> Hearn
> Sent: Montag, 10. März 2003 12:30
> To: pigolkine@gmx.de
> Cc: mono-winforms-list@lists.ximian.com;
> mono-devel-list-admin@lists.ximian.com
> Subject: Re: [Mono-winforms-list] Monostub for Wine SWF
> On Mon, 2003-03-10 at 09:43, Alexandre Pigolkine wrote:
> > I've checked in modifications to monostub. Wine/SWF applications 
> > should
> > start now under Linux. Better to redirect stderr, due to output from 
> > Wine's pthread_cond*.
> Hi, are there any docs on what monostub does? Or could you explain it
> here?
> I'm wondering if you tried extending Wines own pthreads implementation,
> as suggested on wine-devel?
Mike Hearn <m.hearn@signal.qinetiq.com>
QinetiQ - Malvern Technology Center