首页 > 代码库 > error C2065: 'TIME_UTC' : undeclared identifier
error C2065: 'TIME_UTC' : undeclared identifier
boost_1_55_0\boost\threadpool\task_adaptors.hpp(138) : error C2065: ‘TIME_UTC‘ : undeclared identifier
boost_1_55_0 version
threadpool-0_2_5 version
解决办法:(This patch fixes compilation)
--- dependencies/threadpool/include/threadpool/task_adaptors.hpp +++ dependencies/threadpool/include/threadpool/task_adaptors.hpp @@ -135,7 +135,11 @@ if(m_break_s > 0 || m_break_ns > 0) { // Sleep some time before first execution xtime xt; +#if BOOST_VERSION >= 105000 + xtime_get(&xt, TIME_UTC_); +#else xtime_get(&xt, TIME_UTC); +#endif xt.nsec += m_break_ns; xt.sec += m_break_s; thread::sleep(xt); @@ -146,7 +150,11 @@ if(m_break_s > 0 || m_break_ns > 0) { xtime xt; +#if BOOST_VERSION >= 105000 + xtime_get(&xt, TIME_UTC_); +#else xtime_get(&xt, TIME_UTC); +#endif xt.nsec += m_break_ns; xt.sec += m_break_s; thread::sleep(xt);
参考:https://github.com/vpython/visual/issues/3
error C2065: 'TIME_UTC' : undeclared identifier
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。