[gtkmm] Glib::signal_io
- From: "Find All" <find_all hotmail com>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Glib::signal_io
- Date: Wed, 07 Jan 2004 15:29:10 +0000
I'm having some problems with the Glib::signal_io().connect() function to do
the reading from a serial port.
The code:
/* ***********
serie.hh
*********** */
#ifndef _SERIE_HH
#define _SERIE_HH
#include "config.h"
#include <iostream>
#include <stdio.h>
#include <sys/shm.h>
#include <glib-2.0/glib.h>
#include <unistd.h>
#include <gtkmm.h>
class serie
{
public:
serie();
bool callback_funcion(Glib::IOCondition);
int fd;
protected:
private:
SigC::Connection conexion;
};
#endif
/* ***********
serie.cc
********** */
serie::serie()
{
// We put de descriptor of the serial port into fd
// Make the polling of the port with the callback_funcion
this->conexion =
Glib::signal_io().connect(SigC::slot(*this,&serie::callback_funcion),
this->fd,
Glib::IO_IN);
}
bool serie::callback_funcion(Glib::IOCondition con)
{
// It doesn't work so does nothing :-(
}
When I try to compile I get this error message :
g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -DORBIT2=1 -pthread
-I/usr/include/libgnomeuimm-2.0 -I/usr/lib/libgnomeuimm-2.0/include
-I/usr/include/libgnomemm-2.0 -I/usr/lib/libgnomemm-2.0/include
-I/usr/include/libgnomecanvasmm-2.0 -I/usr/lib/libgnomecanvasmm-2.0/include
-I/usr/include/gconfmm-2.0 -I/usr/lib/gconfmm-2.0/include
-I/usr/include/libglademm-2.0 -I/usr/lib/libglademm-2.0/include
-I/usr/include/libbonobouimm-2.0 -I/usr/lib/libbonobouimm-2.0/include
-I/usr/include/libgnomeui-2.0 -I/usr/include/gtkmm-2.0
-I/usr/lib/gtkmm-2.0/include -I/usr/include/libgnome-2.0
-I/usr/include/gtk-2.0 -I/usr/lib/sigc++-1.2/include
-I/usr/include/sigc++-1.2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include
-I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2
-I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/orbit-2.0
-I/usr/include/libbonobo-2.0 -I/usr/include/gconf/2
-I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include
-I/usr/include/linc-1.0 -I/usr/include/bonobo-activation-2.0
-I/usr/include/libxml2 -I/usr/include/libgnomecanvas-2.0
-I/usr/include/libart-2.0 -I/usr/include/libglade-2.0
-I/usr/include/libbonobomm-2.0 -I/usr/lib/libbonobomm-2.0/include
-I/usr/include/libbonoboui-2.0 -I/usr/include/orbitcpp-2.0
-I/usr/local/include/mysql -c -o serie.o `test -f 'serie.cc' || echo
'./'`serie.cc
In the file included of /usr/include/sigc++-1.2/sigc++/object_slot.h:98:
/usr/include/sigc++-1.2/sigc++/object_slot.h: In the constructor
`SigC::ObjectSlotNode::ObjectSlotNode(void (*)(void*), T*, void*, T2)
[with
T = serie, T2 = bool (serie::*)(Glib::IOCondition)]':
/usr/include/sigc++-1.2/sigc++/slot.h:255: instanced from `SigC::Slot1<R,
P1>::Slot1(SigC::SlotNode*) [with R = bool, P1 = Glib::IOCondition]'
/usr/include/sigc++-1.2/sigc++/object_slot.h:98: instanced from
`SigC::Slot1<R, P1> SigC::slot(O1&, R (O2::*)(P1)) [with R = bool, P1 =
Glib::IOCondition, O1 = serie, O2 = serie]'
serie.cc:102: instanced from
/usr/include/sigc++-1.2/sigc++/object_slot.h:35: no se encuentra una función
coincidente para la llamada a `SigC::ObjectSlotNode::init(serie*&,
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::*)())
make: *** [serie.o] Error 1
_________________________________________________________________
Reserva y planifica tu viaje online. http://www.msn.es/Viajes/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]