[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtkmm
Subject:    [gtkmm] no matching function for call to `Gtk::Main::run (Gtk::Window &)'
From:       "Kirk Morrow" <kirk_morrow () hotmail ! com>
Date:       2002-09-28 2:00:50
[Download RAW message or body]

I can't get the first sample program in the tutorial to compile.  The code 
is:

#include <gtkmm.h>

int main(int argc, char *argv[])
{
   Gtk::Main kit(argc, argv);

   Gtk::Window window;
   kit.run(window);

   return 0;
}

First of all, <gtkmm.h> had to be changed to <gtk--.h>.

Second, `pkg-config gtkmm-2.0 --cflags --libs` (or gtkmm-1.2 in my case) 
doesn't work.  It complains about not finding a file called gtkmm-1.2.pc and 
setting the
environment variable PKG_CONFIG_PATH.  However, no such file was installed 
with
any of the following RPMS:

gnomemm-1.1.15-1.i386.rpm
gnomemm-devel-1.1.15-1.i386.rpm
gtkmm-1.2.5-1.i386.rpm
gtkmm-devel-1.2.5-1.i386.rpm
libsigc++-1.0.1-0_helix_1.i386.rpm
libsigc++-devel-1.0.1-0_helix_1.i386.rpm

Instead, I compile using:

g++ `sigc-config --cflags --libs` `gtkmm-config --cflags --libs` `gtk-config 
--cflags --libs` -I/usr/include/gnome-- base.cc

Now attempting to compile results in:

base.cc: In function `int main (int, char **)':
base.cc:8: no matching function for call to `Gtk::Main::run
(Gtk::Window &)'
/usr/include/gtk--/main.h:168: candidates are: static void
Gtk::Main::run ()

If I change "kit.run(window);" to "kit.run();", it compiles.  However when I 
run
no window appears, as I would aspect, and it just sits waiting for me to 
press ^C.

I'm not a programming newbie, but I am a GUI programming newbie and any 
assistance
is greatly appreciated.  Thanx.


** Unsolicited commercial Email delivered to this address will be
subject to a $1500 charge. Emailing such items, whether manually or
automatically, constitutes acceptance of these terms & conditions.**

kirk_morrow@hotmail.com

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com

_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic