Re: [gtkmm] bug in the published documentation



On Tue, 2002-11-26 at 16:46, Jiongxiong Chen wrote:
> When I
> compile it, I got the folloing error message:
> 
> g++ -g menu.cc -o menu `pkg-config gtkmm-2.0 --libs --cflags`

Why not just run "make" in examples/book/menus?

> menu.cc: In method `ExampleWindow::ExampleWindow()':
> menu.cc:72: no matching function for call to `Gtk::Menu_Helpers::StockMenuElem::StockMenuElem (Gtk::StockID, Gtk::Menu &)'
> /usr/include/gtkmm-2.0/gtkmm/menu_elems.h:166: candidates are:
> Gtk::Menu_Helpers::StockMenuElem::StockMenuElem(const Gtk::StockID &, const SigC::Slot0<void> & = Slot0<void>())
> /usr/include/gtkmm-2.0/gtkmm/menu_elems.h:175:
> Gtk::Menu_Helpers::StockMenuElem::StockMenuElem(const Gtk::StockID &, const Gtk::Menu_Helpers::AccelKey &, const SigC::Slot0<void> & = Slot0<void>())
> /usr/include/gtkmm-2.0/gtkmm/menu_elems.h:176:
> Gtk::Menu_Helpers::StockMenuElem::StockMenuElem(const Gtk::Menu_Helpers::StockMenuElem &)
> 
> Compilation exited abnormally with code 1 at Tue Nov 26 10:33:19

I guess you might have an old pre-2.0 gtkmm installed, but you are using
newer example code. What do you get from this:
pkg-config gtkmm-2.0 --modversion
?

Actually, even your example code is out of date. We are using
Gtk::Stock::CDROM
now instead of
Gtk::StockID("gtk-cdrom")

-- 
Murray Cumming
murray usa net
www.murrayc.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]