|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-04-01 10:59:51
Hi Samuel,
> I'm encountering a problem to build the date_time library with BBv2
> under NT with msvc 7.1. I believe this problem has already been
> mentioned in this news group, but I prefer to remember it shortly:
>
> bjam --v2 libs/date_time/build
>
> gives an error in boost\lexical_cast.hpp(150) : error C2679. (no
> operator found which takes a right-hand operand of type 'type' (or
> there is no acceptable conversion)). And other following messages...
>
> The same code (fortunately!) compiled well with BBv1. So I compared
> the compiler "cl" command lines called by bjam and find out that he
> only difference that makes it work (v1) or not (v2) is
> the /Zc:wchar_t option that makes wchar_t become a native type. I
> don't see any straight relation between this option and the error...
I don't recall the specifics, but unless wchar_t is native type
lexical_cast.hpp does not define some overload, and something breaks.
> Finally, I would like some help to implement a fix that would add
> the /Zc:wchar_t option either all the time when msvc toolset is used
> or only for some specified Jamefiles.
The issue is that V2 takes a conservative approach. Unless we're sure that
compiler is 7.0+, we don't pass the option, since earlier compilers did not
have it.
Does using explicit
using msvc : 7.1 ;
helps? What is your installation path? There's some logic in msvc.jam which
tries to guess version from the path. In particular, if the path to the
compiler includes ".NET 2003\\VC7", it should decide it's 7.1 and
pass /Z:wchar_t.
HTH,
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build V2: http://boost.org/boost-build2
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk