Re: [glade--]Simple Hello User App

Christof Petig <[email protected]> Thu, 25 Mar 2004 09:28:19 +0100
Newsgroups gmane.comp.gnome.glademm
Organization Adolf Petig GmbH & Co. KG
Message-ID <[email protected]>
dingo schrieb:
> Hello, I'm trying to get the hang of glademm (haven't touched a piece of
> code in 2+ years) Anyways, I found a nice little 'Hello User' tutorial
> for glade at this url:
> 
> http://writelinux.com/glade/index.php
> 
> I'm using glademm since I'm a lot more familiar with C++. My question is
> this, in this tutorial, to add functionality to the 'Close' button, you
> add this code 'gtk_main_quit();'. Everything I've googled for suggests
> that I should use 'Gtk::Main::quit();' as a replacement. This doesn't
> work however, compiling gives me this error:
> 
> window1.cc: In member function `virtual void
> window1::on_button2_clicked()':
> window1.cc:13: error: incomplete type 'Gtk::Main' cannot be used to name
> a scope
> 
> 
> I'm looking for any help, suggestions, clues, tutorials, etc...

gtkmm.org tutorials are very good (actually you use gtkmm in your code)
- if you use glademm you don't need to worry about the initial hassle to 
set up a project (autoconf/automake/class structure/main)

Did you read the glademm tutorial (which is admittedly brief, of course 
I accept contributions ;-) )?

And to answer your question:
insert
   #include <gtkmm/main.h>
at the top of window1.cc

    Christof