Incompatibilities between Date_Time/PosixTime and Boost.Python !?!?!?
Hi !!
When trying to compile a simple program (just a main and nothing in
it) I get a lot of compile error... I'm using VC 6.0 SP5, STLport
4.5.3 and boost 1.29.
This is what I include in the program :
#include <iostream>
#include
This is probably an issue with the date_time configuration. Try changing the compile macros in boost/date_time/compiler_config.hpp so BOOST_NO_LONG_LONG_ABS is undefined. This is the relevant section of code: //Work around compilers that don't have std::abs #if (defined(__GNUC__) && (__GNUC__ <= 3)) || (defined(BOOST_MSVC) && _MSC_VER <= 1200) || (defined(__BORLANDC__) && (__BORLANDC__
= 0x561)) # define BOOST_NO_LONG_LONG_ABS #endif
Maybe STLPort is defining std::abs for 64 bit integers... Jeff
-----Original Message----- From: acid_til
[mailto:bluc@videotron.ca] Sent: Tuesday, February 04, 2003 8:20 AM To: Boost-Users@yahoogroups.com Subject: [Boost-Users] Incompatibilities between Date_Time/PosixTime and Boost.Python !?!?!? Hi !!
When trying to compile a simple program (just a main and nothing in it) I get a lot of compile error... I'm using VC 6.0 SP5, STLport 4.5.3 and boost 1.29.
This is what I include in the program :
#include <iostream> #include
#include Here are the error messages : boost\date_time\compiler_config.hpp(33) : error C2782: ' __cdecl _STL::abs()' : template parameter 'T' is ambiguous could be 'long double' or 'const struct _STL::complex<long double> &' boost\date_time\compiler_config.hpp(33) : error C2785: ' __cdecl _STL::abs()' and 'long double __cdecl _STL::abs(const struct _STL::complex<long double> &)' have different return types \boost\date_time\compiler_config.hpp(30) : see declaration of 'abs' boost\date_time\compiler_config.hpp(33) : error C2782: ' __cdecl _STL::abs()' : template parameter 'T' is ambiguous could be 'double' or 'const struct _STL::complex<double> &' boost\date_time\compiler_config.hpp(33) : error C2785: ' __cdecl _STL::abs()' and 'double __cdecl _STL::abs(const struct _STL::complex<double> &)' have different return types boost\date_time\compiler_config.hpp(30) : see declaration of 'abs' boost\date_time\compiler_config.hpp(33) : error C2782: ' __cdecl _STL::abs()' : template parameter 'T' is ambiguous could be 'float' or 'const struct _STL::complex<float> &' boost\date_time\compiler_config.hpp(33) : error C2785: ' __cdecl _STL::abs()' and 'float __cdecl _STL::abs(const struct _STL::complex<float> &)' have different return types boost\date_time\compiler_config.hpp(30) : see declaration of 'abs'
Has this been reported ??? Are Boost.Python and posix_time incompatible ??? If not, can someone point to a solution.
Thanks a lot for your time.
--- In Boost-Users@yahoogroups.com, "Jeff Garland"
This is probably an issue with the date_time configuration. Try changing the compile macros in boost/date_ti me/compiler_config.hpp so BOOST_NO_LONG_LONG_ABS is undefined. This is the relevant section of code:
//Work around compilers that don't have std::abs #if (defined(__GNUC__) && (__GNUC__ <= 3)) || (defined(BOOST_MSVC) && _MSC_VER <= 1200) || (defined(__BORLANDC__) && (__BORLANDC__
= 0x561)) # define BOOST_NO_LONG_LONG_ABS #endif
I've made the modification, boost.date_time compiled without any
errors but the program still has errors. In particular it complains :
boost\date_time\time_duration.hpp(61) : error C2784: '_Tp __cdecl
_STL::abs(const struct _STL::complex<_Tp> &)' : could not deduce
template argument for 'const struct _STL::complex<_Tp> &' from
'__int64' boost\date_time\time_duration.hpp(60) : while compiling
class-template member function 'long __thiscall
boost::date_time::time_duration
Maybe STLPort is defining std::abs for 64 bit integers...
Jeff
-----Original Message----- From: acid_til
[mailto:bluc@v...] Sent: Tuesday, February 04, 2003 8:20 AM To: Boost-Users@yahoogroups.com Subject: [Boost-Users] Incompatibilities between
Date_Time/PosixTime and
Boost.Python !?!?!?
Hi !!
When trying to compile a simple program (just a main and nothing in it) I get a lot of compile error... I'm using VC 6.0 SP5, STLport 4.5.3 and boost 1.29.
This is what I include in the program :
#include <iostream> #include
#include Here are the error messages : boost\date_time\compiler_config.hpp(33) : error C2782: ' __cdecl _STL::abs()' : template parameter 'T' is ambiguous could be 'long double' or 'const struct _STL::complex<long double> &' boost\date_time\compiler_config.hpp(33) : error C2785: ' __cdecl _STL::abs()' and 'long double __cdecl _STL::abs(const struct _STL::complex<long double> &)' have different return types \boost\date_time\compiler_config.hpp(30) : see declaration of 'abs' boost\date_time\compiler_config.hpp(33) : error C2782: ' __cdecl _STL::abs()' : template parameter 'T' is ambiguous could be 'double' or 'const struct _STL::complex<double> &' boost\date_time\compiler_config.hpp(33) : error C2785: ' __cdecl _STL::abs()' and 'double __cdecl _STL::abs(const struct _STL::complex<double> &)' have different return types boost\date_time\compiler_config.hpp(30) : see declaration of 'abs' boost\date_time\compiler_config.hpp(33) : error C2782: ' __cdecl _STL::abs()' : template parameter 'T' is ambiguous could be 'float' or 'const struct _STL::complex<float> &' boost\date_time\compiler_config.hpp(33) : error C2785: ' __cdecl _STL::abs()' and 'float __cdecl _STL::abs(const struct _STL::complex<float> &)' have different return types boost\date_time\compiler_config.hpp(30) : see declaration of 'abs'
Has this been reported ??? Are Boost.Python and posix_time incompatible ??? If not, can someone point to a solution.
Thanks a lot for your time.
participants (2)
-
acid_til <bluc@videotron.ca>
-
Jeff Garland