[gtkmm] Objects and signal errors?



Hi, Im starting with gtkmm2, and well, I cant compile this little this:


class prueba5 {

public:
  void saludar();

};

void prueba5::saludar() {

  std::cout << "Prueba\n";
}

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

  Gtk::Window ventana;
  Gtk::Button boton("Soy un botón");

  prueba5 objeto;

  boton.signal_clicked().connect(SigC::slot(objeto, &prueba5::saludar));
  boton.show();

  programa.run();

  return 0;
}

What could be bad? The errors I get:

I get strange errors:

/usr/include/sigc++-1.2/sigc++/object_slot.h: In constructor 
   `SigC::ObjectSlotNode::ObjectSlotNode(void (*)(void*), T*, void*, T2)
[with 
   T = prueba5, T2 = void (prueba5::*)()]':
/usr/include/sigc++-1.2/sigc++/object_slot.h:62:   instantiated from
`SigC::Slot0<R> SigC::slot(O1&, R (O2::*)()) [with R = void, O1 =
prueba5, O2 = prueba5]'
prueba5.cc:32:   instantiated from here
/usr/include/sigc++-1.2/sigc++/object_slot.h:35: no matching function
for call 
   to `SigC::ObjectSlotNode::init(prueba5*&, void*&, void
(SigC::Object::*&)())
   '
/usr/include/sigc++-1.2/sigc++/object_slot.h:36: candidates are: void 
   SigC::ObjectSlotNode::init(SigC::Object*, void*, void
(SigC::Object::*)())







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