Results 1 to 2 of 2

Thread: Need help integrating sigc++ with a KDE3/Qt3 app

  1. #1
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Need help integrating sigc++ with a KDE3/Qt3 app

    Scanning dependencies of target par2kpart
    [ 10%] Building CXX object src/CMakeFiles/par2kpart.dir/par2kpart_part.o
    In file included from /usr/include/sigc++-2.0/sigc++/signal.h:8,
    from /usr/include/sigc++-2.0/sigc++/sigc++.h:23,
    from /usr/include/libpar2/libpar2.h:4,
    from /home/lawrence/Projects/par2kpart/src/par2kpart_part.cpp:8:
    /usr/include/sigc++-2.0/sigc++/signal_base.h: In constructor ‘sigc::internal::temp_slot_list::temp_slot_l ist(std::list<sigc::slot_base, std::allocator<sigc::slot_base> >&)’:
    /usr/include/sigc++-2.0/sigc++/signal_base.h:178: warning: default-initialization of ‘std::list<sigc::slot_base, std::allocator<sigc::slot_base> >& sigc::internal::temp_slot_list::slots_’, which has reference type
    In file included from /usr/include/sigc++-2.0/sigc++/sigc++.h:23,
    from /usr/include/libpar2/libpar2.h:4,
    from /home/lawrence/Projects/par2kpart/src/par2kpart_part.cpp:8:
    /usr/include/sigc++-2.0/sigc++/signal.h: At global scope:
    /usr/include/sigc++-2.0/sigc++/signal.h:613: error: ISO C++ forbids declaration of ‘result_type’ with no type
    /usr/include/sigc++-2.0/sigc++/signal.h:626: error: declaration of ‘static int sigc::internal::signal_emit0<T_return, T_accumulator>::result_type(sigc::internal::signal _impl*)’
    /usr/include/sigc++-2.0/sigc++/signal.h:594: error: conflicts with previous declaration ‘typedef typename T_accumulator::result_type sigc::internal::signal_emit0<T_return, T_accumulator>::result_type’
    /usr/include/sigc++-2.0/sigc++/signal.h: In static member function ‘static int sigc::internal::signal_emit0<T_return, T_accumulator>::result_type(sigc::internal::signal _impl*)’:
    /usr/include/sigc++-2.0/sigc++/signal.h:624: error: expected primary-expression before ‘(’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:624: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:625: error: expected primary-expression before ‘(’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:625: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h: In static member function ‘static typename T_accumulator::result_type sigc::internal::signal_emit0<T_return, T_accumulator>::emit_reverse(sigc::internal::signa l_impl*)’:
    /usr/include/sigc++-2.0/sigc++/signal.h:643: error: expected primary-expression before ‘(’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:643: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:644: error: expected primary-expression before ‘(’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:644: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h: At global scope:
    /usr/include/sigc++-2.0/sigc++/signal.h:668: error: ISO C++ forbids declaration of ‘result_type’ with no type
    /usr/include/sigc++-2.0/sigc++/signal.h:697: error: declaration of ‘static int sigc::internal::signal_emit0<T_return, sigc::nil>::result_type(sigc::internal::signal_imp l*)’
    /usr/include/sigc++-2.0/sigc++/signal.h:657: error: conflicts with previous declaration ‘typedef T_return sigc::internal::signal_emit0<T_return, sigc::nil>::result_type’
    /usr/include/sigc++-2.0/sigc++/signal.h: In static member function ‘static int sigc::internal::signal_emit0<T_return, sigc::nil>::result_type(sigc::internal::signal_imp l*)’:
    /usr/include/sigc++-2.0/sigc++/signal.h:680: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:681: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:684: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:688: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h: In static member function ‘static T_return sigc::internal::signal_emit0<T_return, sigc::nil>::emit_reverse(sigc::internal::signal_im pl*)’:
    /usr/include/sigc++-2.0/sigc++/signal.h:718: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:719: error: expected primary-expression before ‘(’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:719: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:722: error: expected primary-expression before ‘(’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:722: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:726: error: expected primary-expression before ‘(’ token
    /usr/include/sigc++-2.0/sigc++/signal.h:726: error: expected primary-expression before ‘.’ token
    /usr/include/sigc++-2.0/sigc++/signal.h: At global scope:
    /usr/include/sigc++-2.0/sigc++/signal.h:756: error: expected `)' before ‘*’ token
    In file included from /home/lawrence/Projects/par2kpart/src/par2kpart_part.cpp:119:
    /home/lawrence/Projects/par2kpart-build/src/par2kpart_part.moc:176: error: expected `}' at end of input
    /home/lawrence/Projects/par2kpart-build/src/par2kpart_part.moc:176: error: expected unqualified-id at end of input
    /home/lawrence/Projects/par2kpart-build/src/par2kpart_part.moc:176: error: expected `}' at end of input
    /home/lawrence/Projects/par2kpart-build/src/par2kpart_part.moc:176: error: expected `}' at end of input
    make[2]: *** [src/CMakeFiles/par2kpart.dir/par2kpart_part.o] Error 1
    make[1]: *** [src/CMakeFiles/par2kpart.dir/all] Error 2
    make: *** [all] Error 2
    I'm not entirely sure what is going on here - I would suspect that because both Qt and sigc++ define the emit macro that that is causing the problem, but nothing I can see in the output suggests that. It works fine when not integrating in a Qt app.

    Has anyone had experience with this before? The only thing I can find on any mailing lists is that it does indeed casue problems, but no solutions were mentioned.
    Last edited by jacek; 17th November 2007 at 19:23. Reason: changed [code] to [quote]

  2. #2
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Need help integrating sigc++ with a KDE3/Qt3 app

    Ok, for anyone else looking for a solution, there is a very simple solution to this problem. Simply include any header files which use sigc++ signals/slots before including any header files which use Qt's signal/slots.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.