Boost logo

Boost Users :

From: Jochen Hammann (jochen.hammann_at_[hidden])
Date: 2004-12-09 08:28:13


Hello,

I had a very similar problem. I tried to build date_time of Boost 1.32.0 without
native-wchar_t support of the Microsoft Visual C++ 7.1 Compiler. Here is the bjam
command line:

bjam -sTOOLS=vc-7_1 "-sBUILD=debug <native-wchar_t>off" --with-date_time

The build results show the following error:

D:\Projects\3rdParty\Boost\Boost_1_32_0\Temp\boost_1_32_0\boost\lexical_cast.hpp(150) : error C2679: binary '>>' : no operator found which takes a right-hand operand of type
'boost::date_time::date_names_put<Config,charT,OutputIterator>::string_type' (or there is no acceptable conversion)
         with
         [
             Config=boost::gregorian::greg_facet_config,
             charT=wchar_t,
             OutputIterator=std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
         ]
         D:\Projects\3rdParty\Boost\Boost_1_32_0\Temp\boost_1_32_0\boost\lexical_cast.hpp(189) : see reference to function template instantiation 'bool
boost::detail::lexical_stream<Target,Source>::operator >><Target>(InputStreamable &)' being compiled
         with
         [
             Target=boost::date_time::date_names_put<boost::gregorian::greg_facet_config,wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>::string_type,
             Source=const char *,
             InputStreamable=boost::date_time::date_names_put<boost::gregorian::greg_facet_config,wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>::string_type
         ]
         D:\Projects\3rdParty\Boost\Boost_1_32_0\Temp\boost_1_32_0\boost\date_time\date_names_put.hpp(126) : see reference to function template instantiation 'Target
boost::lexical_cast<boost::date_time::date_names_put<Config,charT,OutputIterator>::string_type,const char*>(Source)' being compiled
         with
         [
             Target=boost::date_time::date_names_put<boost::gregorian::greg_facet_config,wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>::string_type,
             Config=boost::gregorian::greg_facet_config,
             charT=wchar_t,
             OutputIterator=std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>,
             Source=const char *
         ]
         D:\Projects\3rdParty\Boost\Boost_1_32_0\Temp\boost_1_32_0\boost\date_time\date_names_put.hpp(122) : while compiling class-template member function 'void
boost::date_time::date_names_put<Config,charT,OutputIterator>::do_put_special_value(boost::date_time::date_names_put<Config,charT,OutputIterator>::iter_type
&,boost::date_time::date_names_put<Config,charT,OutputIterator>::special_value_enum) const'
         with
         [
             Config=boost::gregorian::greg_facet_config,
             charT=wchar_t,
             OutputIterator=std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
         ]
         D:\Projects\3rdParty\Boost\Boost_1_32_0\Temp\boost_1_32_0\boost\date_time\date_names_put.hpp(208) : see reference to class template instantiation
'boost::date_time::date_names_put<Config,charT,OutputIterator>' being compiled
         with
         [
             Config=boost::gregorian::greg_facet_config,
             charT=wchar_t,
             OutputIterator=std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
         ]
         D:\Projects\3rdParty\Boost\Boost_1_32_0\Temp\boost_1_32_0\libs\date_time\build\../src\gregorian\greg_month.cpp(129) : see reference to class template instantiation
'boost::date_time::all_date_names_put<Config,charT>' being compiled
         with
         [
             Config=boost::gregorian::greg_facet_config,
             charT=wchar_t
         ]

The build with enabled native wchar_t support succeeds. I have compared the two Toolset files
vc-7_1-tools.jam and vc-7_1-stlport-tools.jam. Although I'm not very familiar with jam
files, I think that the native wchar_t support of the Visual C++ compiler is disabled
per default in the vc-7_1-stlport Toolset.

vc-7_1-tools.jam: ...
                    feature native-wchar_t : on off ;
                    ...

vc-7_1-stlport-tools.jam: ...
                           feature native-wchar_t : off on ;
                           ...

If I set the BOOST_NO_STD_WSTRING macro - like Jeff suggest - the build without native
wchar_t support succeeds.

Regards,

     Jochen.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net