Opened 18 years ago

Closed 17 years ago

#321 closed Support Requests (Out of Date)

building date_time boost_1_32_0

Reported by: vbdevnet Owned by: az_sw_dude
Milestone: Component: None
Version: None Severity:
Keywords: Cc:

Description

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>bjam -sTOOLS="vc-7_1-
stlport" -sBUILD="<stlport-iostream>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 '>>' : no operator found 
which takes a right-hand operand of 
type 'boost::date_time::date_names_put<Config,charT,O
utputIterator>::string_type' (or there is no acceptable 
conversion)
        with
        [
            Config=boost::gregorian::greg_facet_config,
            charT=wchar_t,
            
OutputIterator=_STL::ostreambuf_iterator<wchar_t,_STL
::char_traits<wchar_t>>
        ]
        D:\_Vlad_Job\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::grego
rian::greg_facet_config,wchar_t,_STL::ostreambuf_iterat
or<wchar_t,_STL::char_traits<wchar_t>>>::string_type,
            Source=const char *,
            
InputStreamable=boost::date_time::date_names_put<bo
ost::gregorian::greg_facet_config,wchar_t,_STL::ostrea
mbuf_iterator<wchar_t,_STL::char_traits<wchar_t>>>::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<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::grego
rian::greg_facet_config,wchar_t,_STL::ostreambuf_iterat
or<wchar_t,_STL::char_traits<wchar_t>>>::string_type,
            Config=boost::gregorian::greg_facet_config,
            charT=wchar_t,
            
OutputIterator=_STL::ostreambuf_iterator<wchar_t,_STL
::char_traits<wchar_t>>,
            Source=const char *


Any suggestions ?

PS: All other libs (thread, regex, test etc) build Ok.

Change History (10)

comment:1 by az_sw_dude, 18 years ago

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

comment:2 by vbdevnet, 18 years ago

Logged In: YES 
user_id=1164601

Hi az_sw_dude, nice to meet you !

I moved forward, by using param 

<native-wchar_t>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="<stlport-
iostream>on <native-wchar_t>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<wchar_t,class 
_STL::char_traits<wchar_t>
,class _STL::allocator<wchar_t> 
>::~basic_string<wchar_t,class _STL::char_traits
<wchar_t>,class _STL::allocator<wchar_t> >(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<struct boost::
gregorian::greg_facet_config,wchar_t,class 
_STL::ostreambuf_iterator<wchar_t,cla
ss _STL::char_traits<wchar_t> > >::do_year_sep_char(class 
_STL::ostreambuf_itera
tor<wchar_t,class _STL::char_traits<wchar_t> > &)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<class 
_STL::_Nondebug_string<wchar_t,class _STL
::char_traits<wchar_t>,class _STL::allocator<wchar_t> 
>,struct _STL::_Nonconst_t
raits<wchar_t> > __thiscall _STL::basic_string<wchar_t,class 
_STL::char_traits<w
char_t>,class _STL::allocator<wchar_t> >::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<struct 
boost::gregorian::greg_facet_config,wchar_t,class _STL::o
streambuf_iterator<wchar_t,class 
_STL::char_traits<wchar_t> > >::put_string(clas
s _STL::ostreambuf_iterator<wchar_t,class 
_STL::char_traits<wchar_t> > &,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<class 
_STL::_Nondebug_string<wchar_t,class _STL
::char_traits<wchar_t>,class _STL::allocator<wchar_t> 
>,struct _STL::_Nonconst_t
raits<wchar_t> > __thiscall _STL::basic_string<wchar_t,class 
_STL::char_traits<w
char_t>,class _STL::allocator<wchar_t> >::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<struct 
boost::gregorian::greg_facet_config,wchar_t,class _ST
L::ostreambuf_iterator<wchar_t,class 
_STL::char_traits<wchar_t> > >::put_string(
class _STL::ostreambuf_iterator<wchar_t,class 
_STL::char_traits<wchar_t> > &,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<class 
_STL::_Nondebug_string<wchar_t,class _STL
::char_traits<wchar_t>,class _STL::allocator<wchar_t> 
>,struct _STL::_Const_trai
ts<wchar_t> > __thiscall _STL::basic_string<wchar_t,class 
_STL::char_traits<wcha
r_t>,class _STL::allocator<wchar_t> >::end(void)const " 
(__imp_?end@?$basic_stri
ng@_WV?$char_traits@_W@_STL@@V?
$allocator@_W@2@@_STL@@QBE?AU?$_DBG_iter@V?$_Nond


comment:3 by marksnelling, 18 years ago

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>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 '>>' : 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=_STL::ostreambuf_iterator<wchar_t,_STL::char_traits<wchar_t>>
        ]
        C:\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,_STL::ostreambuf_iterator<wchar_t,_STL::char_traits<wchar_t>>>::string_type,
            Source=const char *,
           
InputStreamable=boost::date_time::date_names_put<boost::gregorian::greg_facet_config,wchar_t,_STL::ostreambuf_iterator<wchar_t,_STL::char_traits<wchar_t>>>::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<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,_STL::ostreambuf_iterator<wchar_t,_STL::char_traits<wchar_t>>>::string_type,
            Config=boost::gregorian::greg_facet_config,
            charT=wchar_t,
           
OutputIterator=_STL::ostreambuf_iterator<wchar_t,_STL::char_traits<wchar_t>>,
            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<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=_STL::ostreambuf_iterator<wchar_t,_STL::char_traits<wchar_t>>
        ]
       
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<Config,charT,OutputIterator>'
being compiled
        with
        [
            Config=boost::gregorian::greg_facet_config,
            charT=wchar_t,
           
OutputIterator=_STL::ostreambuf_iterator<wchar_t,_STL::char_traits<wchar_t>>
        ]
       
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<Config,charT>' 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<_CharT,_Traits,_Alloc>' being compiled
        with
        [
            _CharT=char,
            _Traits=_STL::char_traits<char>,
            _Alloc=_STL::allocator<char>
        ]
...
...


comment:4 by az_sw_dude, 18 years ago

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__) && (__GNUC__ < 3)) || \
      (defined(_MSC_VER) && (_MSC_VER <= 1200)) ) && \
      !defined(_STLP_OWN_IOSTREAMS) ) || \
       defined(__BORLANDC__)
#define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS
#endif

This should effectively block out all code associated with
operator<< and operator>> 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
<native-wchar_t>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

comment:5 by marksnelling, 18 years ago

Logged In: YES 
user_id=167158

I've tried commenting out the section you mentioned:
#if (((defined(__GNUC__) && (__GNUC__ < 3)) || \
      (defined(_MSC_VER) && (_MSC_VER <= 1200)) ) && \
      !defined(_STLP_OWN_IOSTREAMS) ) || \
       defined(__BORLANDC__)
#define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS
#endif

But this seems to make no difference.

Mark.

comment:6 by useradd, 18 years ago

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
<stlport-iostream>(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.

comment:7 by useradd, 18 years ago

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
<stlport-iostream>(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.

comment:8 by useradd, 18 years ago

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.

comment:9 by az_sw_dude, 17 years ago

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

comment:10 by az_sw_dude, 17 years ago

Status: assignedclosed
Note: See TracTickets for help on using tickets.