[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtkmm
Subject:    Error compiling notebook example
From:       Chun Yang <achunyang2010 () gmail ! com>
Date:       2010-10-18 5:48:29
Message-ID: AANLkTi=3KCJhXRKKiWLmX8CfoTL2FR2Q-W_w-nZ+pBVJ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello,

I just subscribed to gtkmm-list@gnome.org. I haven't got my account settled
yet. When reply please add my email as well as the list. I am not sure this
is the correct way to get help on gtkmm GUI program. Please let me know.

I am have a compiling error when compiling the notebook example on the
following web-page.

http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-multi-item-containers.html.en#sec-notebook


This is offendinf code:

  m_Notebook.signal_switch_page().connect(sigc::mem_fun(*this,
              &ExampleWindow::on_notebook_switch_page) );

Here is the compilation errors:
**********************************************************************************************
 [chun@localhost notebook]$ make
g++ -o obj/Linux/examplewindow.o -c -Iinc `pkg-config gtkmm-2.4 --cflags`
src/examplewindow.cpp
In file included from /usr/include/sigc++-2.0/sigc++/functors/slot.h:7,
                 from /usr/include/sigc++-2.0/sigc++/signal_base.h:28,
                 from /usr/include/sigc++-2.0/sigc++/signal.h:8,
                 from /usr/include/sigc++-2.0/sigc++/sigc++.h:23,
                 from /usr/include/glibmm-2.4/glibmm/signalproxy.h:13,
                 from /usr/include/glibmm-2.4/glibmm/objectbase.h:23,
                 from /usr/include/glibmm-2.4/glibmm/wrap.h:26,
                 from
/usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:25,
                 from /usr/include/glibmm-2.4/glibmm/arrayhandle.h:23,
                 from /usr/include/glibmm-2.4/glibmm.h:27,
                 from /usr/include/gtkmm-2.4/gtkmm.h:29,
                 from inc/examplewindow.h:4,
                 from src/examplewindow.cpp:2:
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h: In member function
‘typename sigc::adaptor_functor<T_functor>::deduce_result_type<T_arg1,
T_arg2, void, void, void, void, void>::type
sigc::adaptor_functor<T_functor>::operator()(T_arg1, T_arg2) const [with
T_arg1 = GtkNotebookPage* const&, T_arg2 = const unsigned int&, T_functor =
sigc::bound_mem_functor2<void, ExampleWindow, Gtk::Widget*, unsigned int>]’:
/usr/include/sigc++-2.0/sigc++/functors/slot.h:173:   instantiated from
‘static T_return sigc::internal::slot_call2<T_functor, T_return, T_arg1,
T_arg2>::call_it(sigc::internal::slot_rep*, typename
sigc::type_trait<T_arg3>::take, typename sigc::type_trait<T_arg4>::take)
[with T_functor = sigc::bound_mem_functor2<void, ExampleWindow,
Gtk::Widget*, unsigned int>, T_return = void, T_arg1 = GtkNotebookPage*,
T_arg2 = unsigned int]’
/usr/include/sigc++-2.0/sigc++/functors/slot.h:180:   instantiated from
‘static void* (* sigc::internal::slot_call2<T_functor, T_return, T_arg1,
T_arg2>::address())(void*) [with T_functor = sigc::bound_mem_functor2<void,
ExampleWindow, Gtk::Widget*, unsigned int>, T_return = void, T_arg1 =
GtkNotebookPage*, T_arg2 = unsigned int]’
/usr/include/sigc++-2.0/sigc++/functors/slot.h:607:   instantiated from
‘sigc::slot2<T_return, T_arg1, T_arg2>::slot2(const T_functor&) [with
T_functor = sigc::bound_mem_functor2<void, ExampleWindow, Gtk::Widget*,
unsigned int>, T_return = void, T_arg1 = GtkNotebookPage*, T_arg2 = unsigned
int]’
/usr/include/sigc++-2.0/sigc++/functors/slot.h:1184:   instantiated from
‘sigc::slot<T_return, T_arg1, T_arg2, sigc::nil, sigc::nil, sigc::nil,
sigc::nil, sigc::nil>::slot(const T_functor&) [with T_functor =
sigc::bound_mem_functor2<void, ExampleWindow, Gtk::Widget*, unsigned int>,
T_return = void, T_arg1 = GtkNotebookPage*, T_arg2 = unsigned int]’
src/examplewindow.cpp:30:   instantiated from here
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:103: error: no match
for call to ‘(sigc::bound_mem_functor2<void, ExampleWindow, Gtk::Widget*,
unsigned int>) (GtkNotebookPage* const&, const unsigned int&)’
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1916: note: candidates
are: T_return sigc::bound_mem_functor2<T_return, T_obj, T_arg1,
T_arg2>::operator()(typename sigc::type_trait<T_arg3>::take, typename
sigc::type_trait<T_arg4>::take) const [with T_return = void, T_obj =
ExampleWindow, T_arg1 = Gtk::Widget*, T_arg2 = unsigned int]
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:103: error:
return-statement with a value, in function returning 'void'
make: *** [obj/Linux/examplewindow.o] Error 1
[chun@localhost notebook]$
---------------------------------------------------------------------------------------------------------------------------------------------


Thanks,
Chun


[Attachment #5 (text/html)]

Hello,<br><br>I just subscribed to <a \
href="mailto:gtkmm-list@gnome.org">gtkmm-list@gnome.org</a>. I haven&#39;t got my \
account settled yet. When reply please add my email as well as the list. I am not \
sure this is the correct way to get help on gtkmm GUI program. Please let me \
know.<br> <br>I am have a compiling error when compiling the notebook example on the \
following web-page.<br>       <a \
href="http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-multi-item-containers \
.html.en#sec-notebook">http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-multi-item-containers.html.en#sec-notebook</a><br>
 <br>This is offendinf code:<br><br>  \
m_Notebook.signal_switch_page().connect(sigc::mem_fun(*this,<br>              \
&amp;ExampleWindow::on_notebook_switch_page) );<br><br>Here is the compilation \
errors:<br>**********************************************************************************************<br>
 [chun@localhost notebook]$ make<br>g++ -o obj/Linux/examplewindow.o -c -Iinc \
`pkg-config gtkmm-2.4 --cflags` src/examplewindow.cpp<br>In file included from \
/usr/include/sigc++-2.0/sigc++/functors/slot.h:7,<br>                 from \
/usr/include/sigc++-2.0/sigc++/signal_base.h:28,<br>  from \
/usr/include/sigc++-2.0/sigc++/signal.h:8,<br>                 from \
/usr/include/sigc++-2.0/sigc++/sigc++.h:23,<br>                 from \
/usr/include/glibmm-2.4/glibmm/signalproxy.h:13,<br>                 from \
/usr/include/glibmm-2.4/glibmm/objectbase.h:23,<br>  from \
/usr/include/glibmm-2.4/glibmm/wrap.h:26,<br>                 from \
/usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:25,<br>                 from \
/usr/include/glibmm-2.4/glibmm/arrayhandle.h:23,<br>  from \
/usr/include/glibmm-2.4/glibmm.h:27,<br>                 from \
/usr/include/gtkmm-2.4/gtkmm.h:29,<br>                 from \
inc/examplewindow.h:4,<br>                 from \
src/examplewindow.cpp:2:<br>/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h: \
In member function ‘typename \
sigc::adaptor_functor&lt;T_functor&gt;::deduce_result_type&lt;T_arg1, T_arg2, void, \
void, void, void, void&gt;::type \
sigc::adaptor_functor&lt;T_functor&gt;::operator()(T_arg1, T_arg2) const [with T_arg1 \
= GtkNotebookPage* const&amp;, T_arg2 = const unsigned int&amp;, T_functor = \
sigc::bound_mem_functor2&lt;void, ExampleWindow, Gtk::Widget*, unsigned \
                int&gt;]’:<br>
/usr/include/sigc++-2.0/sigc++/functors/slot.h:173:   instantiated from ‘static \
T_return sigc::internal::slot_call2&lt;T_functor, T_return, T_arg1, \
T_arg2&gt;::call_it(sigc::internal::slot_rep*, typename \
sigc::type_trait&lt;T_arg3&gt;::take, typename sigc::type_trait&lt;T_arg4&gt;::take) \
[with T_functor = sigc::bound_mem_functor2&lt;void, ExampleWindow, Gtk::Widget*, \
unsigned int&gt;, T_return = void, T_arg1 = GtkNotebookPage*, T_arg2 = unsigned \
                int]’<br>
/usr/include/sigc++-2.0/sigc++/functors/slot.h:180:   instantiated from ‘static void* \
(* sigc::internal::slot_call2&lt;T_functor, T_return, T_arg1, \
T_arg2&gt;::address())(void*) [with T_functor = sigc::bound_mem_functor2&lt;void, \
ExampleWindow, Gtk::Widget*, unsigned int&gt;, T_return = void, T_arg1 = \
                GtkNotebookPage*, T_arg2 = unsigned int]’<br>
/usr/include/sigc++-2.0/sigc++/functors/slot.h:607:   instantiated from \
‘sigc::slot2&lt;T_return, T_arg1, T_arg2&gt;::slot2(const T_functor&amp;) [with \
T_functor = sigc::bound_mem_functor2&lt;void, ExampleWindow, Gtk::Widget*, unsigned \
                int&gt;, T_return = void, T_arg1 = GtkNotebookPage*, T_arg2 = \
                unsigned int]’<br>
/usr/include/sigc++-2.0/sigc++/functors/slot.h:1184:   instantiated from \
‘sigc::slot&lt;T_return, T_arg1, T_arg2, sigc::nil, sigc::nil, sigc::nil, sigc::nil, \
sigc::nil&gt;::slot(const T_functor&amp;) [with T_functor = \
sigc::bound_mem_functor2&lt;void, ExampleWindow, Gtk::Widget*, unsigned int&gt;, \
T_return = void, T_arg1 = GtkNotebookPage*, T_arg2 = unsigned int]’<br> \
src/examplewindow.cpp:30:   instantiated from \
here<br>/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:103: error: no match \
for call to ‘(sigc::bound_mem_functor2&lt;void, ExampleWindow, Gtk::Widget*, unsigned \
                int&gt;) (GtkNotebookPage* const&amp;, const unsigned int&amp;)’<br>
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1916: note: candidates are: \
T_return sigc::bound_mem_functor2&lt;T_return, T_obj, T_arg1, \
T_arg2&gt;::operator()(typename sigc::type_trait&lt;T_arg3&gt;::take, typename \
sigc::type_trait&lt;T_arg4&gt;::take) const [with T_return = void, T_obj = \
                ExampleWindow, T_arg1 = Gtk::Widget*, T_arg2 = unsigned int]<br>
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:103: error: return-statement \
with a value, in function returning &#39;void&#39;<br>make: *** \
[obj/Linux/examplewindow.o] Error 1<br>[chun@localhost \
notebook]$<br>---------------------------------------------------------------------------------------------------------------------------------------------<br>
 <br>Thanks,<br>Chun<br><br><br><br>



_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic