[Gtk-sharp-list] Newbie Question

Rafael Teixeira Rafael Teixeira <monoman@gmail.com>
Mon, 7 Feb 2005 16:06:43 -0200

Hi Brad, You are right, but I am right too...

The config files are needed, and these entries are understood only by
Mono and are the way to have a single compiled managed binary that
works on .NET/Windows and Mono/Linux,etc... calling equivalent, but
differently named, native libraries.

But if someone installs the GTK# packages in linux (or does a 'make
install' of the GTK# sources) these config files are installed at the
appropriate place: in the same directory where the assemblies (.dlls)
are copied (normally inside the Mono's GAC).

All I'm saying is that the much advertised "copy install" for managed
assemblies just doesn't work with anything that directly calls native
libraries (and GTK# is just a good wrapping of the GTK libraries).

Hope it is now clear,

On Sun, 06 Feb 2005 11:02:20 -0800, Brad Taylor <brad@getcoded.net> wrote:
> Hi,
> > Well, you are trying to run a GTK# app without installing GTK# in your Linux...
> >
> > GTK# is not part of Mono, Besides installing Mono you have to instal
> > GTK# in Linux to run your app.
> Not neccessarily.  The error that Zak provided
> > > I get "Unhandled Exception:
> > > System.DllNotFoundException: libgtk-win32-2.0-0.dll".
> just indicates that he doesn't have the Win32 version of libgtk on Linux
> (which makes sense).  What it seems needs to happen for having true
> portability would be for the Win32 version of Mono to, in a DLL mapping
> file, have a map between libgtk-x11-2.0.so and libgtk-win32-2.0.0.dll so
> that the program would, in the executable, reference the X11 version,
> but on windows, really use the Win32 version.  This mapping may already
> exist, but I'm not versed enough with the Win32 port to know if it does.
> On my Mono installation (1.0.5 in Debian Sid), I have a mapping file
> that happens to map libgtk-win32-2.0-0.dll to the X11 version, so on my
> system, this would work.
> The mapping on my system (gtk-sharp.dll.config) is as follows:
> <configuration>
>   <dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.so.0"/>
>   <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/>
>   <dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so.0"/>
>   <dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0"/>
> </configuration>
> It seems like every distribution puts these config files in a different
> directory, but in general, I believe you can put the <dllmap> lines
> in /etc/mono/config and it _should_ work.  I'll leave it up to someone
> more experienced to, if I'm wrong, bash me over the head and give you
> the correct instructions on this one.
> Hope this helps,
> -Brad
> --
> Brad Taylor
> Genome Software LLC
> http://www.getcoded.net

Rafael "Monoman" Teixeira
I'm trying to become a "Rosh Gadol" before my own eyes. 
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.