Boost C++ Libraries: Ticket #321: building date_time boost_1_32_0 https://svn.boost.org/trac10/ticket/321 <pre class="wiki">Hi I need to build date_time boost_1_32_0 for .NET 2003 Here is dos build command line and output: D:\some_path\boost_1_32_0&gt;bjam -sTOOLS="vc-7_1- stlport" -sBUILD="&lt;stlport-iostream&gt;on" - sSTLPORT_PATH="D:\\some_path" --with-date_time stage ...found 641 targets... ...updating 12 targets... vc-C++ bin\boost\libs\date_time\build\boost_date_time.dll\vc- 7_1-stlport\debug\threading-multi\greg_month.obj greg_month.cpp D:\_Vlad_Job\boost_1_32_0\boost\lexical_cast.hpp (150) : error C2679: binary '&gt;&gt;' : no operator found which takes a right-hand operand of type 'boost::date_time::date_names_put&lt;Config,charT,O utputIterator&gt;::string_type' (or there is no acceptable conversion) with [ Config=boost::gregorian::greg_facet_config, charT=wchar_t, OutputIterator=_STL::ostreambuf_iterator&lt;wchar_t,_STL ::char_traits&lt;wchar_t&gt;&gt; ] D:\_Vlad_Job\boost_1_32_0\boost\lexical_cast.hpp (189) : see reference to function template instantiation 'bool boost::detail::lexical_stream&lt;Target,Source&gt;::operator &gt;&gt;&lt;Target&gt;(InputStreamable &amp;)' being compiled with [ Target=boost::date_time::date_names_put&lt;boost::grego rian::greg_facet_config,wchar_t,_STL::ostreambuf_iterat or&lt;wchar_t,_STL::char_traits&lt;wchar_t&gt;&gt;&gt;::string_type, Source=const char *, InputStreamable=boost::date_time::date_names_put&lt;bo ost::gregorian::greg_facet_config,wchar_t,_STL::ostrea mbuf_iterator&lt;wchar_t,_STL::char_traits&lt;wchar_t&gt;&gt;&gt;::s tring_type ] D:\_Vlad_Job\boost_1_32_0 \boost\date_time\date_names_put.hpp(126) : see reference to function template instantiation 'Target boost::lexical_cast&lt;boost::date_time::date_names_put&lt; Config,charT,OutputIterator&gt;::string_type,const char*&gt; (Source)' being compiled with [ Target=boost::date_time::date_names_put&lt;boost::grego rian::greg_facet_config,wchar_t,_STL::ostreambuf_iterat or&lt;wchar_t,_STL::char_traits&lt;wchar_t&gt;&gt;&gt;::string_type, Config=boost::gregorian::greg_facet_config, charT=wchar_t, OutputIterator=_STL::ostreambuf_iterator&lt;wchar_t,_STL ::char_traits&lt;wchar_t&gt;&gt;, Source=const char * Any suggestions ? PS: All other libs (thread, regex, test etc) build Ok. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/321 Trac 1.4.3 az_sw_dude Tue, 23 Nov 2004 12:32:19 GMT <link>https://svn.boost.org/trac10/ticket/321#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/321#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=579686 We have retested this recently and it works fine here. You are the second person to report this, so there is clearly some mode in which this happens. Are you certain the the VC7.1 compiler is first in your path variable when building? The errors are indicative of what might happen if VC6 was in the path instead of VC7.1. Jeff </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>vbdevnet</dc:creator> <pubDate>Tue, 23 Nov 2004 23:21:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/321#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/321#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=1164601 Hi az_sw_dude, nice to meet you ! I moved forward, by using param &lt;native-wchar_t&gt;on so current output is: (I suppose not appropriate lib versions linked here, but any comments will be helpfull) bjam -sTOOLS="vc-7_1-stlport" -sBUILD="&lt;stlport- iostream&gt;on &lt;native-wchar_t&gt;on" - sSTLPORT_PATH="C:\\_Vlad_Job" --with-date_time stage ...found 643 targets... ...updating 6 targets... vc-Link bin\boost\libs\date_time\build\boost_date_time.dll\vc- 7_1-stlport\debug\ native-wchar_t-on\threading-multi\boost_date_time-vc71-mt- gdp-1_32.dll bin\boost \libs\date_time\build\boost_date_time.dll\vc-7_1- stlport\debug\native-wchar_t-on \threading-multi\boost_date_time-vc71-mt-gdp-1_32.lib Creating library bin\boost\libs\date_time\build\boost_date_time.dll\vc-7_1-st lport\debug\native-wchar_t-on\threading- multi\boost_date_time-vc71-mt-gdp-1_32.l ib and object bin\boost\libs\date_time\build\boost_date_time.dll\vc-7_1- stlport\ debug\native-wchar_t-on\threading-multi\boost_date_time- vc71-mt-gdp-1_32.exp greg_month.obj : error LNK2019: unresolved external symbol "__declspec(dllimport ) public: __thiscall _STL::basic_string&lt;wchar_t,class _STL::char_traits&lt;wchar_t&gt; ,class _STL::allocator&lt;wchar_t&gt; &gt;::~basic_string&lt;wchar_t,class _STL::char_traits &lt;wchar_t&gt;,class _STL::allocator&lt;wchar_t&gt; &gt;(void)" (__imp_?? 1?$basic_string@_WV?$ char_traits@_W@_STL@@V? $allocator@_W@2@@_STL@@QAE@XZ) referenced in function "pr otected: virtual void __thiscall boost::date_time::date_names_put&lt;struct boost:: gregorian::greg_facet_config,wchar_t,class _STL::ostreambuf_iterator&lt;wchar_t,cla ss _STL::char_traits&lt;wchar_t&gt; &gt; &gt;::do_year_sep_char(class _STL::ostreambuf_itera tor&lt;wchar_t,class _STL::char_traits&lt;wchar_t&gt; &gt; &amp;)const " (? do_year_sep_char@?$da te_names_put@Ugreg_facet_config@gregorian@boost@@_WV ?$ostreambuf_iterator@_WV?$c har_traits@_W@_STL@@@_STL@@@date_time@boost@@MB EXAAV?$ostreambuf_iterator@_WV?$c har_traits@_W@_STL@@@_STL@@@Z) greg_month.obj : error LNK2019: unresolved external symbol "__declspec(dllimport ) public: struct _STL::_DBG_iter&lt;class _STL::_Nondebug_string&lt;wchar_t,class _STL ::char_traits&lt;wchar_t&gt;,class _STL::allocator&lt;wchar_t&gt; &gt;,struct _STL::_Nonconst_t raits&lt;wchar_t&gt; &gt; __thiscall _STL::basic_string&lt;wchar_t,class _STL::char_traits&lt;w char_t&gt;,class _STL::allocator&lt;wchar_t&gt; &gt;::end(void)" (__imp_?end@?$basic_string@ _WV?$char_traits@_W@_STL@@V? $allocator@_W@2@@_STL@@QAE?AU?$_DBG_iter@V? $_Nondebu g_string@_WV?$char_traits@_W@_STL@@V? $allocator@_W@2@@_STL@@U?$_Nonconst_traits@ _W@2@@2@XZ) referenced in function "protected: void __thiscall boost::date_time: :date_names_put&lt;struct boost::gregorian::greg_facet_config,wchar_t,class _STL::o streambuf_iterator&lt;wchar_t,class _STL::char_traits&lt;wchar_t&gt; &gt; &gt;::put_string(clas s _STL::ostreambuf_iterator&lt;wchar_t,class _STL::char_traits&lt;wchar_t&gt; &gt; &amp;,wchar_t const * const)const " (?put_string@? $date_names_put@Ugreg_facet_config@gregoria n@boost@@_WV?$ostreambuf_iterator@_WV? $char_traits@_W@_STL@@@_STL@@@date_time@bo ost@@IBEXAAV?$ostreambuf_iterator@_WV? $char_traits@_W@_STL@@@_STL@@QB_W@Z) greg_month.obj : error LNK2019: unresolved external symbol "__declspec(dllimport ) public: struct _STL::_DBG_iter&lt;class _STL::_Nondebug_string&lt;wchar_t,class _STL ::char_traits&lt;wchar_t&gt;,class _STL::allocator&lt;wchar_t&gt; &gt;,struct _STL::_Nonconst_t raits&lt;wchar_t&gt; &gt; __thiscall _STL::basic_string&lt;wchar_t,class _STL::char_traits&lt;w char_t&gt;,class _STL::allocator&lt;wchar_t&gt; &gt;::begin(void)" (__imp_?begin@?$basic_str ing@_WV?$char_traits@_W@_STL@@V? $allocator@_W@2@@_STL@@QAE?AU?$_DBG_iter@V?$_Non debug_string@_WV?$char_traits@_W@_STL@@V? $allocator@_W@2@@_STL@@U?$_Nonconst_tra its@_W@2@@2@XZ) referenced in function "protected: void __thiscall boost::date_t ime::date_names_put&lt;struct boost::gregorian::greg_facet_config,wchar_t,class _ST L::ostreambuf_iterator&lt;wchar_t,class _STL::char_traits&lt;wchar_t&gt; &gt; &gt;::put_string( class _STL::ostreambuf_iterator&lt;wchar_t,class _STL::char_traits&lt;wchar_t&gt; &gt; &amp;,wch ar_t const * const)const " (?put_string@? $date_names_put@Ugreg_facet_config@greg orian@boost@@_WV?$ostreambuf_iterator@_WV? $char_traits@_W@_STL@@@_STL@@@date_tim e@boost@@IBEXAAV?$ostreambuf_iterator@_WV? $char_traits@_W@_STL@@@_STL@@QB_W@Z) greg_month.obj : error LNK2019: unresolved external symbol "__declspec(dllimport ) public: struct _STL::_DBG_iter&lt;class _STL::_Nondebug_string&lt;wchar_t,class _STL ::char_traits&lt;wchar_t&gt;,class _STL::allocator&lt;wchar_t&gt; &gt;,struct _STL::_Const_trai ts&lt;wchar_t&gt; &gt; __thiscall _STL::basic_string&lt;wchar_t,class _STL::char_traits&lt;wcha r_t&gt;,class _STL::allocator&lt;wchar_t&gt; &gt;::end(void)const " (__imp_?end@?$basic_stri ng@_WV?$char_traits@_W@_STL@@V? $allocator@_W@2@@_STL@@QBE?AU?$_DBG_iter@V?$_Nond </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>marksnelling</dc:creator> <pubDate>Wed, 24 Nov 2004 10:29:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/321#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/321#comment:3</guid> <description> <pre class="wiki">Logged In: YES user_id=167158 I get this problem too. I have visual studio 6 installed but I've double checked my path and there are no references to 6 at all, just 7.1. Here's the command line I used: C:\boost.1.32.0&gt;bjam -sTOOLS="vc-7_1-stlport" --stage-dir=".\" --with-date_time stage ...patience... ...patience... ...found 8556 targets... ...updating 749 targets... MkDir1 bin MkDir1 bin\boost MkDir1 bin\boost\libs MkDir1 bin\boost\libs\date_time MkDir1 bin\boost\libs\date_time\build MkDir1 bin\boost\libs\date_time\build\boost_date_time.dll MkDir1 bin\boost\libs\date_time\build\boost_date_time.dll\vc-7_1-stlport MkDir1 bin\boost\libs\date_time\build\boost_date_time.dll\vc-7_1-stlport\debug MkDir1 bin\boost\libs\date_time\build\boost_date_time.dll\vc-7_1-stlport\debug\threading-multi vc-C++ bin\boost\libs\date_time\build\boost_date_time.dll\vc-7_1-stlport\debug\threading-multi\greg_month.obj greg_month.cpp C:\boost.1.32.0\boost\lexical_cast.hpp(150) : error C2679: binary '&gt;&gt;' : no operator found which takes a right-hand operand of type 'boost::date_time::date_names_put&lt;Config,charT,OutputIterator&gt;::string_type' (or there is no acceptable conversion) with [ Config=boost::gregorian::greg_facet_config, charT=wchar_t, OutputIterator=_STL::ostreambuf_iterator&lt;wchar_t,_STL::char_traits&lt;wchar_t&gt;&gt; ] C:\boost.1.32.0\boost\lexical_cast.hpp(189) : see reference to function template instantiation 'bool boost::detail::lexical_stream&lt;Target,Source&gt;::operator &gt;&gt;&lt;Target&gt;(InputStreamable &amp;)' being compiled with [ Target=boost::date_time::date_names_put&lt;boost::gregorian::greg_facet_config,wchar_t,_STL::ostreambuf_iterator&lt;wchar_t,_STL::char_traits&lt;wchar_t&gt;&gt;&gt;::string_type, Source=const char *, InputStreamable=boost::date_time::date_names_put&lt;boost::gregorian::greg_facet_config,wchar_t,_STL::ostreambuf_iterator&lt;wchar_t,_STL::char_traits&lt;wchar_t&gt;&gt;&gt;::string_type ] C:\boost.1.32.0\boost\date_time\date_names_put.hpp(126) : see reference to function template instantiation 'Target boost::lexical_cast&lt;boost::date_time::date_names_put&lt;Config,charT,OutputIterator&gt;::string_type,const char*&gt;(Source)' being compiled with [ Target=boost::date_time::date_names_put&lt;boost::gregorian::greg_facet_config,wchar_t,_STL::ostreambuf_iterator&lt;wchar_t,_STL::char_traits&lt;wchar_t&gt;&gt;&gt;::string_type, Config=boost::gregorian::greg_facet_config, charT=wchar_t, OutputIterator=_STL::ostreambuf_iterator&lt;wchar_t,_STL::char_traits&lt;wchar_t&gt;&gt;, Source=const char * ] C:\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&lt;Config,charT,OutputIterator&gt;::do_put_special_value(boost::date_time::date_names_put&lt;Config,charT,OutputIterator&gt;::iter_type &amp;,boost::date_time::date_names_put&lt;Config,charT,OutputIterator&gt;::special_value_enum) const' with [ Config=boost::gregorian::greg_facet_config, charT=wchar_t, OutputIterator=_STL::ostreambuf_iterator&lt;wchar_t,_STL::char_traits&lt;wchar_t&gt;&gt; ] C:\boost.1.32.0\boost\date_time\date_names_put.hpp(208) : see reference to class template instantiation 'boost::date_time::date_names_put&lt;Config,charT,OutputIterator&gt;' being compiled with [ Config=boost::gregorian::greg_facet_config, charT=wchar_t, OutputIterator=_STL::ostreambuf_iterator&lt;wchar_t,_STL::char_traits&lt;wchar_t&gt;&gt; ] C:\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&lt;Config,charT&gt;' being compiled with [ Config=boost::gregorian::greg_facet_config, charT=wchar_t ] C:\Program Files\STLport-4.6.2\stlport\stdexcept(149) : see reference to class template instantiation '_STL::basic_string&lt;_CharT,_Traits,_Alloc&gt;' being compiled with [ _CharT=char, _Traits=_STL::char_traits&lt;char&gt;, _Alloc=_STL::allocator&lt;char&gt; ] ... ... </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>az_sw_dude</dc:creator> <pubDate>Wed, 24 Nov 2004 13:43:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/321#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/321#comment:4</guid> <description> <pre class="wiki">Logged In: YES user_id=579686 Can't believe I didn't notice this in your first request, but all of this trouble is related to STLPort somehow. Because STLPort has had limited wchar_t support in the past, we macro out alot of code when we detect it. If you look in boost/date_time/compiler_config.hpp you will see the following: // workaround for errors associated with output for date classes // modifications and input streaming for time classes. // Compilers affected are: // gcc295, msvc (neither with STLPort), any borland // #if (((defined(__GNUC__) &amp;&amp; (__GNUC__ &lt; 3)) || \ (defined(_MSC_VER) &amp;&amp; (_MSC_VER &lt;= 1200)) ) &amp;&amp; \ !defined(_STLP_OWN_IOSTREAMS) ) || \ defined(__BORLANDC__) #define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS #endif This should effectively block out all code associated with operator&lt;&lt; and operator&gt;&gt; for dates and times leaving you with only with to_string, from_string methods for I/O. Somehow this appears to not be consistent. By setting the &lt;native-wchar_t&gt;on you've somehow worked around the problem. Another option might be to change the macro above and see if include 'full headers' would now work with VC7.1 and STLPort. Alternatively you might try to make sure that BOOST_NO_STD_LOCALE is set as well (see locale_config.hpp) -- that might be causing the inconsistency if that isn't set properly (just a guess). As for the link errors, it all seems wchar_t related again. I'm not sure what STLPort has for wchar_t support, but if there is a way to make sure wchar_t it is enabled in your STLPort build I would pursue that. HTH, Jeff </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>marksnelling</dc:creator> <pubDate>Thu, 25 Nov 2004 15:28:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/321#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/321#comment:5</guid> <description> <pre class="wiki">Logged In: YES user_id=167158 I've tried commenting out the section you mentioned: #if (((defined(__GNUC__) &amp;&amp; (__GNUC__ &lt; 3)) || \ (defined(_MSC_VER) &amp;&amp; (_MSC_VER &lt;= 1200)) ) &amp;&amp; \ !defined(_STLP_OWN_IOSTREAMS) ) || \ defined(__BORLANDC__) #define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS #endif But this seems to make no difference. Mark. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>useradd</dc:creator> <pubDate>Mon, 06 Dec 2004 06:55:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/321#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/321#comment:6</guid> <description> <pre class="wiki">Logged In: YES user_id=247012 I also have the problem build date_time with vc-7_1- stlport and msvc-stlport , I accept the default value of &lt;stlport-iostream&gt;(document says default value is off). I compiled the stlport 4.62 with default configure. I am sure that the VC7.1 compiler are the first VC compiler in my path because when install vc6, I deny the register enviroment variable operation. The library of filesystem, python, regex, singal,, thread etc are all OK. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>useradd</dc:creator> <pubDate>Mon, 06 Dec 2004 06:56:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/321#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/321#comment:7</guid> <description> <pre class="wiki">Logged In: YES user_id=247012 I also have the problem build date_time with vc-7_1- stlport and msvc-stlport , I accept the default value of &lt;stlport-iostream&gt;(document says default value is off). I compiled the stlport 4.62 with default configure. I am sure that the VC7.1 compiler are the first VC compiler in my path because when install vc6, I deny the register enviroment variable operation. The library of filesystem, python, regex, singal,, thread etc are all OK. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>useradd</dc:creator> <pubDate>Tue, 07 Dec 2004 02:32:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/321#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/321#comment:8</guid> <description> <pre class="wiki">Logged In: YES user_id=247012 I can not compiled date_time and program_options in TOOLS vc-7_1-stlport. My platform is VC7.1 with stlport 4.62, cl versions 13.10.3077, I compiled stlport 4.62 with default configure. When compiling date_time and program_options there is stlport\stdexcept(149) occur, that can be remove by compiling the code with /GX in VC7.1. I do not how to send the compile message to the author because I can not visit the website www.boost.org But I compile the above library with TOOLS vc-7_1 successly. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>az_sw_dude</dc:creator> <pubDate>Mon, 13 Feb 2006 12:23:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/321#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/321#comment:9</guid> <description> <pre class="wiki">Logged In: YES user_id=579686 This report is now hopelessly out of date -- not sure whether it was ever resolved. Closing it out now... Jeff </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>az_sw_dude</dc:creator> <pubDate>Mon, 13 Feb 2006 12:24:02 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/321#comment:10 https://svn.boost.org/trac10/ticket/321#comment:10 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket