[Gtk-sharp-list] Make Gtk# come with program
Thomas Pryds Lauritsen
pryds at duckburg.dk
Sun Feb 12 16:52:48 EST 2006
Jonathan Pryor wrote:
> You need all of:
> - The assemblies you use (gtk-sharp.dll, etc.)
> - The .config files for those assemblies (gtk-sharp.dll.config, etc.
> -- and those are located in the GAC, not in the
> $prefix/lib/mono/gtk-sharp-2.0 directory.
> - All "glue" libraries, e.g. /usr/lib/libgtksharpglue.so
> Because of the last one, you'll need to use a shell-script to invoke
> your program, and within that script you'll need to set LD_LIBRARY_PATH
> to include the directory that contains those "glue" libraries.
Thank you a lot for your answer. It seems to have made me come further
towards the goal, indeed. However, I still get an error when trying to
run the program on the Fedora system:
[thomas at thorn DizniLogsTest]$ export
[thomas at thorn DizniLogsTest]$ mono DizniLogs.exe
Unhandled Exception: System.TypeInitializationException: An exception
was thrown by the type initializer for Gtk.Container --->
in (wrapper managed-to-native)
in <0x0000a> Gtk.Container:.cctor ()--- End of inner exception stack
in <0x00000> <unknown method>
in <0x0000e> Gtk.Bin:.ctor (IntPtr raw)
in <0x0002f> Gtk.Window:.ctor (WindowType type)
in <0x0000c> Gtk.Window:.ctor (System.String title)
in <0x000d6> MyProgram:.ctor (System.String args)
in <0x00019> MainClass:Main (System.String args)
I put all .dll.config and glue files in the same dir as the .exe:
[thomas at thorn DizniLogsTest]$ ls
It seems that gtksharpglue-2 cannot be found, although (if I'm not
mistaken) it is there in the dir. So perhaps another env. variable or
something similar is needed?
> Furthermore (again, because of the glue libs), this will only work for
> Linux distros; you won't be able to use the same "bundle" with Win32, as
> you'll need the win32 glue libraries as well.
This is no problem for me.
More information about the Gtk-sharp-list