Deriving Widget Class, compile error



Hello, i am experiencing a problem when trying to compile the example at
http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-builder-using-derived-widgets.html.en

I compile with :
g++ `pkg-config gtkmm-2.4 --cflags --libs` main.cc

and i get this error :
/tmp/ccm1AzsY.o: In function `void Gtk::Builder::get_widget_derived<DerivedDialog>(Glib::ustring const&, DerivedDialog*&)': main.cc:(.text._ZN3Gtk7Builder18get_widget_derivedI13DerivedDialogEEvRKN4Glib7ustringERPT_[void Gtk::Builder::get_widget_derived<DerivedDialog>(Glib::ustring const&, DerivedDialog*&)]+0x6e): undefined reference to `typeinfo for DerivedDialog' main.cc:(.text._ZN3Gtk7Builder18get_widget_derivedI13DerivedDialogEEvRKN4Glib7ustringERPT_[void Gtk::Builder::get_widget_derived<DerivedDialog>(Glib::ustring const&, DerivedDialog*&)]+0x118): undefined reference to `DerivedDialog::DerivedDialog(_GtkDialog*, Glib::RefPtr<Gtk::Builder> const&)'
collect2: ld returned 1 exit status

I guess it is not a problem with the sources, but with the compilation?
Any idea?

Thank you,
Damianos.


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