unresolved overloaded function type



Hi
I have ported an application which compiled and worked well
to another computer. When i compile it here i get the following error:

ImageDisplay.cpp: In static member function 'static void
ImageDisplay::displayImage(ValReader*, bool, char*, char*)':
ImageDisplay.cpp:84: error: call of overloaded 'ptr_fun(<unresolved
overloaded function type>)' is ambiguous
/usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:471: note:
candidates are: sigc::pointer_functor1<T_arg1, T_return>
sigc::ptr_fun(T_return (*)(T_arg1)) [with T_arg1 = GdkEventKey*,
T_return = bool]
/usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:482: note:
      sigc::pointer_functor2<T_arg1, T_arg2, T_return>
sigc::ptr_fun(T_return (*)(T_arg1, T_arg2)) [with T_arg1 = __pid_t,
T_arg2 = int, T_return = int]

The offending call is:
            win1.signal_key_press_event().connect(sigc::ptr_fun(&kill));
which is called in a constructor of a class,
and win1 is a Gtk::Window:
 Gtk::Window win1;

kill is a global function:
  bool kill(GdkEventKey *e) {
      Gtk::Main::quit();
      //    printf("Bye\n");
      return true;
  }
Interestingly, a similar call preceding the one above
       win1.signal_motion_notify_event().connect(sigc::ptr_fun(&coords));
poses no problems. coords is
  bool coords(GdkEventMotion *e);

I compile with the recommended  `pkg-config gtkmm-2.4 --cflags`

Is there any way to fix that problem?

Thank you
  Jody


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