[Gtk-sharp-list] Hello world can't find Gtk???
10 Dec 2002 23:22:54 -0600
First let me say this stuff looks way cool!!! (Kudo's to all building
mono and gtk#)
I saw the helloworld.cs gui app
(http://gtk-sharp.sourceforge.net/gtk-hello-world.png) and tried to make
it myself. Mono(0.17) is installed and working fine, and I think Gtk# is
as well (at least it didn't error when I ran the usual
configure/make/makeinstall). I'm running a fairly vanilla install of
when I run mcs helloworld.cs I get 3 errors as follows:
HelloWorld.cs(16) error CS0246: Cannot find type 'Gtk.Window'
HelloWorld.cs(13) error CS0161: Not all code paths return a value
HelloWorld.cs(26) error CS0246: Cannot find type 'SignalArgs'
Should this no longer work or am I doing something wrong??? I'm pretty
new to C#, so I could just be making a stupid mistake I suppose. Any
help would be great!
Here's my code:
//Helloworld.cs - GTK Window Class Test
public class HelloWorld
public static int Main (string args)
Gtk.Window win = new Gtk.Window(Gtk.WindowType.Toplevel);
win.Title = "Gtk# Hello World";
win.DeleteEvent += new EventHandler(Window_Delete);
static void Window_Delete (object obj, EventArgs args)
SignalArgs sa = (SignalArgs) args;
sa.RetVal = true;