2

这是升压信号定义

    boost::signal<void (const MetaData&)> sigChangeTrackMD;

应该调用命名空间 GSTREAMER 中的函数 changeTrack

void changeTrack(const MetaData& md){.....}

信号连接

sigChangeTrackMD.connect(GSTREAMER::changeTrack);

但是以下错误来了。声明错了吗?

Engine/GSTAdaptor.cpp:21:44: error: no match for call to '(boost::signal<void(const MetaData&)>) (<unresolved overloaded function type>)'
/usr/include/boost/signal.hpp:329:9: note: candidates are:
/usr/include/boost/signals/signal_template.hpp:330:1: note: boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::result_type boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::operator()(T1) [with R = void, T1 = const MetaData&, Combiner = boost::last_value<void>, Group = int, GroupCompare = std::less<int>, SlotFunction = boost::function<void(const MetaData&)>, boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::result_type = void]
/usr/include/boost/signals/signal_template.hpp:330:1: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const MetaData&'
/usr/include/boost/signals/signal_template.hpp:370:1: note: boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::result_type boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::operator()(T1) const [with R = void, T1 = const MetaData&, Combiner = boost::last_value<void>, Group = int, GroupCompare = std::less<int>, SlotFunction = boost::function<void(const MetaData&)>, boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::result_type = void]
/usr/include/boost/signals/signal_template.hpp:370:1: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const MetaData&'
Engine/GSTAdaptor.cpp:22:42: error: no match for call to '(boost::signal<void(std::basic_string<char>&)>) (<unresolved overloaded function type>)'
/usr/include/boost/signal.hpp:329:9: note: candidates are:
/usr/include/boost/signals/signal_template.hpp:330:1: note: boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::result_type boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::operator()(T1) [with R = void, T1 = std::basic_string<char>&, Combiner = boost::last_value<void>, Group = int, GroupCompare = std::less<int>, SlotFunction = boost::function<void(std::basic_string<char>&)>, boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::result_type = void]
/usr/include/boost/signals/signal_template.hpp:330:1: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_string<char>&'
/usr/include/boost/signals/signal_template.hpp:370:1: note: boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::result_type boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::operator()(T1) const [with R = void, T1 = std::basic_string<char>&, Combiner = boost::last_value<void>, Group = int, GroupCompare = std::less<int>, SlotFunction = boost::function<void(std::basic_string<char>&)>, boost::signal1<R, T1, Combiner, Group, GroupCompare, SlotFunction>::result_type = void]
/usr/include/boost/signals/signal_template.hpp:370:1: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_string<char>&'
make: *** [GSTAdaptor.o] Error 1
4

0 回答 0