[sigc] compilation problems



sorry if my question is stupid but, why does libsigc++ not work for me?

Here is the files I use:
The Header:
...
#include <sigc++/sigc++.h>

namespace dtk
{

typedef enum {
	DTK_WDG_HIDED = 0,
	DTK_WDG_SHOWN = 1
}wdg_state;

class widget : protected eventReceiver
{
	
	public:
		widget();
		virtual ~widget();
		virtual void draw();
		virtual void redraw(int width=0, int height=0);
		virtual void show();
		virtual void hide();
		virtual void dock(IDirectFBSurface& dfb_surface);
		virtual IDirectFBSurface* undock();
		
		//Slots
		sigc::signal<bool, dtk::widget, void*> onCreate;
		sigc::signal<bool, dtk::widget, void*> onDestroy;
		sigc::signal<bool, dtk::widget, void*> onDraw;
		sigc::signal<bool, dtk::widget, void*> onShow;
		sigc::signal<bool, dtk::widget, void*> onHide;
		sigc::signal<bool, dtk::widget, void*> onDock;
		sigc::signal<bool, dtk::widget, void*> onUndock;
		//Actions
		//None for the moment
....

The Implementation:

#include "widget.h"

namespace dtk
{

widget::widget()
{
	onCreate();
}


widget::~widget()
{
	onDestroy();
}

...

And when I try to compile my file, here is the result:
if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"DTK\" -DVERSION=\"0.0.1\"  -I. -I. -D_REENTRANT -I/usr/include/++dfb -I/usr/include/directfb   -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include   -DDATADIR=\"/usr/share\" -DPACKAGE=\"DTK\"   -Wall -O2 -pipe  -MT widget.o -MD -MP -MF ".deps/widget.Tpo" -c -o widget.o widget.cpp; \
then mv -f ".deps/widget.Tpo" ".deps/widget.Po"; else rm -f ".deps/widget.Tpo"; exit 1; fi
event.h:31: warning: 'class dtk::eventReceiver' has virtual functions but non-virtual destructor
widget.cpp: In constructor 'dtk::widget::widget()':
widget.cpp:29: error: no matching function for call to 'sigc::signal<bool, dtk::widget, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::emit()'
/usr/include/sigc++-2.0/sigc++/signal.h:1923: note: candidates are: typename sigc::internal::signal_emit2<T_return, T_arg1, T_arg2, T_accumulator>::result_type sigc::signal2<T_return, T_arg1, T_arg2, T_accumulator>::emit(typename sigc::type_trait<T_derived>::take, typename sigc::type_trait<T_arg3>::take) const [with T_return = bool, T_arg1 = dtk::widget, T_arg2 = void*, T_accumulator = sigc::nil]
widget.cpp: In destructor 'virtual dtk::widget::~widget()':
widget.cpp:35: error: no match for call to '(sigc::signal<bool, dtk::widget, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>) ()'/usr/include/sigc++-2.0/sigc++/signal.h:1927: note: candidates are: typename sigc::internal::signal_emit2<T_return, T_arg1, T_arg2, T_accumulator>::result_type sigc::signal2<T_return, T_arg1, T_arg2, T_accumulator>::operator()(typename sigc::type_trait<T_derived>::take, typename sigc::type_trait<T_arg3>::take) const [with T_return = bool, T_arg1 = dtk::widget, T_arg2 = void*, T_accumulator = sigc::nil]
widget.cpp: In member function 'virtual void dtk::widget::draw()':
widget.cpp:42: error: no match for call to '(sigc::signal<bool, dtk::widget, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>) ()'/usr/include/sigc++-2.0/sigc++/signal.h:1927: note: candidates are: typename sigc::internal::signal_emit2<T_return, T_arg1, T_arg2, T_accumulator>::result_type sigc::signal2<T_return, T_arg1, T_arg2, T_accumulator>::operator()(typename sigc::type_trait<T_derived>::take, typename sigc::type_trait<T_arg3>::take) const [with T_return = bool, T_arg1 = dtk::widget, T_arg2 = void*, T_accumulator = sigc::nil]
widget.cpp: In member function 'virtual void dtk::widget::redraw(int, int)':
widget.cpp:49: error: no match for call to '(sigc::signal<bool, dtk::widget, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>) ()'/usr/include/sigc++-2.0/sigc++/signal.h:1927: note: candidates are: typename sigc::internal::signal_emit2<T_return, T_arg1, T_arg2, T_accumulator>::result_type sigc::signal2<T_return, T_arg1, T_arg2, T_accumulator>::operator()(typename sigc::type_trait<T_derived>::take, typename sigc::type_trait<T_arg3>::take) const [with T_return = bool, T_arg1 = dtk::widget, T_arg2 = void*, T_accumulator = sigc::nil]
widget.cpp: In member function 'virtual void dtk::widget::show()':
widget.cpp:56: error: no match for call to '(sigc::signal<bool, dtk::widget, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>) ()'/usr/include/sigc++-2.0/sigc++/signal.h:1927: note: candidates are: typename sigc::internal::signal_emit2<T_return, T_arg1, T_arg2, T_accumulator>::result_type sigc::signal2<T_return, T_arg1, T_arg2, T_accumulator>::operator()(typename sigc::type_trait<T_derived>::take, typename sigc::type_trait<T_arg3>::take) const [with T_return = bool, T_arg1 = dtk::widget, T_arg2 = void*, T_accumulator = sigc::nil]
widget.cpp: In member function 'virtual void dtk::widget::hide()':
widget.cpp:63: error: no match for call to '(sigc::signal<bool, dtk::widget, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>) ()'/usr/include/sigc++-2.0/sigc++/signal.h:1927: note: candidates are: typename sigc::internal::signal_emit2<T_return, T_arg1, T_arg2, T_accumulator>::result_type sigc::signal2<T_return, T_arg1, T_arg2, T_accumulator>::operator()(typename sigc::type_trait<T_derived>::take, typename sigc::type_trait<T_arg3>::take) const [with T_return = bool, T_arg1 = dtk::widget, T_arg2 = void*, T_accumulator = sigc::nil]
widget.cpp: In member function 'virtual void dtk::widget::dock(IDirectFBSurface&)':
widget.cpp:70: error: cannot convert 'IDirectFBSurface**' to 'IDirectFBSurface*' in assignment
widget.cpp:71: error: no match for call to '(sigc::signal<bool, dtk::widget, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>) ()'/usr/include/sigc++-2.0/sigc++/signal.h:1927: note: candidates are: typename sigc::internal::signal_emit2<T_return, T_arg1, T_arg2, T_accumulator>::result_type sigc::signal2<T_return, T_arg1, T_arg2, T_accumulator>::operator()(typename sigc::type_trait<T_derived>::take, typename sigc::type_trait<T_arg3>::take) const [with T_return = bool, T_arg1 = dtk::widget, T_arg2 = void*, T_accumulator = sigc::nil]
widget.cpp: In member function 'virtual IDirectFBSurface* dtk::widget::undock()':
widget.cpp:80: error: no match for call to '(sigc::signal<bool, dtk::widget, void*, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>) ()'/usr/include/sigc++-2.0/sigc++/signal.h:1927: note: candidates are: typename sigc::internal::signal_emit2<T_return, T_arg1, T_arg2, T_accumulator>::result_type sigc::signal2<T_return, T_arg1, T_arg2, T_accumulator>::operator()(typename sigc::type_trait<T_derived>::take, typename sigc::type_trait<T_arg3>::take) const [with T_return = bool, T_arg1 = dtk::widget, T_arg2 = void*, T_accumulator = sigc::nil]
make[1]: *** [widget.o] Error 1


Can someone help me? 
Many thanks.

Ps: I'm using gcc-4.0.2 on a gentoo box, don't know if it change something



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