class'boost :: shared_ptr <t>'需要让dll接口被类'boost :: signals :: connection'的客户端使用</t>

时间:2012-07-31 06:42:36

标签: visual-c++ warnings boost-signals

编译代码时出现以下错误。

c:\boost_1_48_0\boost\signals\connection.hpp(118) : warning C4251: 'boost::signals::connection::con' : class 'boost
::shared_ptr<T>' needs to have dll-interface to be used by clients of class 'boost::signals::connection'

代码中的信号定义为

boost::signal<void (long long int)> totalTimeChanged;
boost::signal<void (unsigned int)> curTimeChanged;

连接以

完成
GStreamer::totalTimeChanged.connect(boost::bind(&MainWindow\
            ::total_time_changed, &player, _1));

编译成功但我如何摆脱这些编译器警告?

1 个答案:

答案 0 :(得分:3)