[gtkmm] Undefined reference to virtual table



Hi,

 I was trying to create a testcase for bug#87912 (I can still reproduce
 it with today's CVS), but I ran into a problem:

$ g++ -Werror -Wall -w -g -O2 -o testcase testcase.cc `pkg-config --cflags --libs gtkmm-2.0`
/tmp/ccoiKzdP.o: In function `Glib::HelperList<Gtk::MenuItem, Gtk::Menu_Helpers::Element const, Glib::List_Cpp_Iterator<_GtkMenuItem, Gtk::MenuItem> >::erase(Glib::List_Cpp_Iterator<_GtkMenuItem, Gtk::MenuItem>, Glib::List_Cpp_Iterator<_GtkMenuItem, Gtk::MenuItem>)':
/usr/include/sigc++-1.2/sigc++/slot.h(.MainWindow::gnu.linkonce.t.(int)+0x4c): undefined reference to `MainWindow::SigC::ObjectBase virtual table'
/usr/include/sigc++-1.2/sigc++/slot.h(.MainWindow::gnu.linkonce.t.(int)+0x55): undefined reference to `MainWindow::Glib::ObjectBase virtual table'
/usr/include/sigc++-1.2/sigc++/slot.h(.MainWindow::gnu.linkonce.t.(int)+0x5c): undefined reference to `MainWindow virtual table'
collect2: ld returned 1 exit status

 I'm sure it's something silly, but I just can't see it.  The test
 program is available at http://people.debian.org/~mmagallo/testcase.cc

 This is modelled after glademm's output.  glademm creates two classes:
 one FooBar_window and one FooBar which inherits from FooBar_window.
 The reason for this is to let glademm rewrite the code that creates the
 GUI components without overwriting other stuff like slots and other
 non-glademm generated code.  In this scenario, clicking on the close
 button of the window makes the program segfault.

 Thanks for the help,

 Marcelo



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