[Mono-list] GTK#/Windows

Serge serge@wildwestsoftware.com
Wed, 17 Jul 2002 18:49:58 +0300


> How did you build the dlls? Reportedly, it works if they are built with
> the ms tools, but they don't work if build with gcc.

I have only built the glue library myself and used pre-built GTK DLLs and they were built with GCC.
In fact, I can't think of any reasons why GCC-build libraries shouldn't work with .NET runtime.
One reason is mangling, but GTK-exported names are not mangled.
Another one is calling convention, but even though it's set to winapi in GTK# libraries (whereas exports
in GTK libs are cdecl), it works anyway (compiler expects callee to clean up the stack, so stack of the
caller grows after every such call, but it will be reclaimed in the method's epilogue anyway: ESP restored from EBP).
All in all, both .NET & Mono use LoadLibrary/GetAddress API to load DLLs (Mono uses it indirectly via gmodule).
So any valid Windows DLL should work fine.

Sergey


----- Original Message ----- 
From: "Paolo Molaro" <lupus@ximian.com>
To: <mono-list@ximian.com>
Sent: Wednesday, July 17, 2002 4:11 PM
Subject: Re: [Mono-list] GTK#/Windows


> On 07/17/02 Serge wrote:
> > I'm not following GTK# development closely, but it was mentioned several times on this list and elsewhere
> > (e.g. on Phonic's page http://www.atoker.com/phonic/) that GTK# doesn't work under Windows/.NET
> > Framework because of some P/Invoke issues.
> [...]
> > What else I am missing?
> 
> How did you build the dlls? Reportedly, it works if they are built with
> the ms tools, but they don't work if build with gcc.
> 
> lupus
> 
> -- 
> -----------------------------------------------------------------
> lupus@debian.org                                     debian/rules
> lupus@ximian.com                             Monkeys do it better
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>