i've been working on c++ project using boost, , between compiles, must have upgraded in boost without meaning or something, because boost dependencies won't compile:
in file included /usr/include/boost/thread/pthread/mutex.hpp:14:0, /usr/include/boost/thread/mutex.hpp:16, /usr/include/boost/thread/pthread/thread_data.hpp:12, /usr/include/boost/thread/thread.hpp:17, /usr/include/boost/thread.hpp:13, /blah.h:4, bluh.h:3, bleh/main.cpp:4: /usr/include/boost/thread/xtime.hpp:23:5: error: expected identifier before numeric constant /usr/include/boost/thread/xtime.hpp:23:5: error: expected '}' before numeric constant /usr/include/boost/thread/xtime.hpp:23:5: error: expected unqualified-id before numeric constant /usr/include/boost/thread/xtime.hpp:46:14: error: expected type-specifier before 'system_time' in file included /usr/include/boost/thread/pthread/mutex.hpp:14:0, /usr/include/boost/thread/mutex.hpp:16, /usr/include/boost/thread/pthread/thread_data.hpp:12, /usr/include/boost/thread/thread.hpp:17, /usr/include/boost/thread.hpp:13, /blah, /bleh,(changed these names, obviously) /bluh /main.cpp:4: /usr/include/boost/thread/xtime.hpp: in function 'int xtime_get(xtime*, int)': /usr/include/boost/thread/xtime.hpp:73:40: error: 'get_system_time' not declared in scope /usr/include/boost/thread/xtime.hpp:73:40: note: suggested alternative: /usr/include/boost/thread/thread_time.hpp:19:24: note: 'boost::get_system_time' /usr/include/boost/thread/xtime.hpp: @ global scope: /usr/include/boost/thread/xtime.hpp:88:1: error: expected declaration before '}' token make[2]: *** [cmakefiles/edge_based_tracker.dir/main.o] error 1 make[1]: *** [cmakefiles/edge_based_tracker.dir/all] error 2 make: *** [all] error 2
any ideas? tried changing time_utc time_utc_ recommended me on site, didn't seem help.
edit: boost version version: 1.48.0.2. i've attached xtime below:
// copyright (c) 2001-2003 // william e. kempf // copyright (c) 2007-8 anthony williams // // distributed under boost software license, version 1.0. (see accompanying // file license_1_0.txt or copy @ http://www.boost.org/license_1_0.txt) #ifndef boost_xtime_wek070601_hpp #define boost_xtime_wek070601_hpp #include <boost/thread/detail/config.hpp> #include <boost/cstdint.hpp> #include <boost/thread/thread_time.hpp> #include <boost/date_time/posix_time/conversion.hpp> #include <boost/config/abi_prefix.hpp> namespace boost { enum xtime_clock_types { time_utc=1 //line 23 // time_tai, // time_monotonic, // time_process, // time_thread, // time_local, // time_sync, // time_resolution }; struct xtime { #if defined(boost_no_int64_t) typedef int_fast32_t xtime_sec_t; //int_fast32_min <= sec <= int_fast32_max #else typedef int_fast64_t xtime_sec_t; //int_fast64_min <= sec <= int_fast64_max #endif typedef int_fast32_t xtime_nsec_t; //0 <= xtime.nsec < nanoseconds_per_second xtime_sec_t sec; xtime_nsec_t nsec; operator system_time() const { return boost::posix_time::from_time_t(0)+ boost::posix_time::seconds(static_cast<long>(sec))+ #ifdef boost_date_time_has_nanoseconds boost::posix_time::nanoseconds(nsec); #else boost::posix_time::microseconds((nsec+500)/1000); #endif } }; inline xtime get_xtime(boost::system_time const& abs_time) { xtime res; boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0); res.sec=static_cast<xtime::xtime_sec_t>(time_since_epoch.total_seconds()); res.nsec=static_cast<xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second())); return res; } inline int xtime_get(struct xtime* xtp, int clock_type) { if (clock_type == time_utc) { *xtp=get_xtime(get_system_time()); return clock_type; } return 0; } inline int xtime_cmp(const xtime& xt1, const xtime& xt2) { if (xt1.sec == xt2.sec) return (int)(xt1.nsec - xt2.nsec); else return (xt1.sec > xt2.sec) ? 1 : -1; } } // namespace boost #include <boost/config/abi_suffix.hpp> #endif //boost_xtime_wek070601_hpp
edit: make clear, code failing on import of boost/thread.hpp
since not show code, can guess. guess define time_utc
macro somewhere in code. macro messes-up xtime.hpp
header.
Comments
Post a Comment