[Gtk-sharp-list] Newbie Question

Brad Taylor brad@getcoded.net
Sun, 06 Feb 2005 11:02:20 -0800


--=-k4jYhIv2hovUlnqKf1aM
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi,

> Well, you are trying to run a GTK# app without installing GTK# in your Li=
nux...
>=20
> 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=3D"libglib-2.0-0.dll" target=3D"libglib-2.0.so.0"/>
  <dllmap dll=3D"libgobject-2.0-0.dll" target=3D"libgobject-2.0.so.0"/>
  <dllmap dll=3D"libatk-1.0-0.dll" target=3D"libatk-1.0.so.0"/>
  <dllmap dll=3D"libgtk-win32-2.0-0.dll" target=3D"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

--=20
Brad Taylor
Genome Software LLC
http://www.getcoded.net

--=-k4jYhIv2hovUlnqKf1aM
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQBCBmm8WZT8MXyJ2AURAt5RAJwJz5pVZEeJbGUKLSIHHExzWRjsiACffsxp
TOzYvMuULB1uZKlhm05vd50=
=53P2
-----END PGP SIGNATURE-----

--=-k4jYhIv2hovUlnqKf1aM--