Re: [gtkmm] Still on threads

I am trying to use:
Glib::Thread::create( SigC::slot_class(*this, &MyCameraFramework::soundCallback), false);

(as in the example program but the compiler complains:

no matching function for call to `Glib::Thread::create (SigC::Slot0, bool)' /usr/include/gtkmm-2.0/glibmm/thread.h:222: candidates are: static Glib::Thread *Glib::Thread::create (const SigC::Slot0 &, bool)

You generally can't use a temporary object where a const object& is
required. Try using SigC::slot() or putting the SigC::slot_class()
instantiation (I assume slot_class is a class name rather than a function)
on the previous line.

I have noticed that I was using the wrong return type (bool rather than void).
Now it compiles both with slot and slot_class()
(however, I still do not understand the compiler error message..)


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