Should I rebuild .lib file after altering?
--
/*******************/
×ÔÓÉ£šliberty£©ÎÞ·ÇŸÍÊÇÕâÑùÒ»ÖÖ³Ðŵ£ºÃ¿žöÈËœ«»áµÃµœÒ»ÖÖ±£ÕÏ£¬±£ÕÏÎÒÃÇ¿ÉÒÔÓë
ÈšÍþ¡¢¶àÊý¡¢Á÷Ë׌°ÓßÂÛµÄÓ°ÏìÏ࿹ºâ¡£
/*******************/
"Jeff Garland"
After I move the line 'using std namespace', the error still occurs. The error occurs in file date_time/time_duration.hpp, line 66. min_type minutes() const { return std::abs(((ticks() / (60*rep_type::res_adjust())) % 60)); }
It seems like the abs function declared in
boost/date_time/compiler_config.
hpp will not be included due to the macro configuration. The relavant code snippet is:
//boost/date_time/compiler_config.hpp //Work around compilers that don't have std::abs #if (__GNUC__ <= 3)|| (defined(BOOST_MSVC) && _MSC_VER <= 1200) # define BOOST_NO_LONG_LONG_ABS #endif
#if defined(BOOST_NO_LONG_LONG_ABS) namespace std { template <typename T> // JDG [7/6/02 made a template] inline T abs(T x) { return x < 0 ? -x : x; } } #endif
You might try altering this so that the function will be defined. Something like (line 22)
#if (__GNUC__ <= 3)|| defined(BOOST_MSVC)
should do the trick. The only thing is that past testing with newer versions of MSVC did not require this so I'm a bit suprised that this is needed. This will only work if the problem is that the compiler is trying to convert the underlying type boost::int64_t into a long or another type because it lacks a std::abs for this type.
Jeff
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/