[Boost-users] MS VC++ wchar_t type build Q

18 views
Skip to first unread message

Scott Morgan

unread,
Sep 3, 2008, 10:43:59 AM9/3/08
to boost...@lists.boost.org
Is there an option to build the Boost libs with or without the wchar_t
treated as built in (that whole /Zc:wchar_t mess MS dropped on us)

Scott


_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Adam Merz

unread,
Sep 3, 2008, 2:16:23 PM9/3/08
to boost...@lists.boost.org
Scott Morgan <blumf <at> blueyonder.co.uk> writes:
> Is there an option to build the Boost libs with or without the wchar_t
> treated as built in (that whole /Zc:wchar_t mess MS dropped on us)

How is being standards conformant 'a mess'?

Anyway, /Zc:wchar_t is passed to the compiler by default, and there is no
built-in option you can pass to bjam to control this behavior. However, what you
can do is, before building Boost, edit your tools/build/v2/tools/msvc.jam file
and remove '/Zc:wchar_t' from line 532. (Be sure to leave a space in front of
the line's terminating semicolon.) Then, to explicitly enable or disable the
option, you can pass either cxxflags="-Zc:wchar_t" or cxxflags="-Zc:wchar_t-" to
bjam.

Scott Morgan

unread,
Sep 4, 2008, 6:01:18 AM9/4/08
to boost...@lists.boost.org
Adam Merz wrote:
> Scott Morgan <blumf <at> blueyonder.co.uk> writes:
>
>> Is there an option to build the Boost libs with or without the wchar_t
>> treated as built in (that whole /Zc:wchar_t mess MS dropped on us)
>>
>
> How is being standards conformant 'a mess'?
>

When it's not default and half the libs you use have it and half don't.

> Anyway, /Zc:wchar_t is passed to the compiler by default, and there is no
> built-in option you can pass to bjam to control this behavior. However, what you
> can do is, before building Boost, edit your tools/build/v2/tools/msvc.jam file
> and remove '/Zc:wchar_t' from line 532. (Be sure to leave a space in front of
> the line's terminating semicolon.) Then, to explicitly enable or disable the
> option, you can pass either cxxflags="-Zc:wchar_t" or cxxflags="-Zc:wchar_t-" to
> bjam.

Thanks.

Scott

Adam Merz

unread,
Sep 4, 2008, 12:55:47 PM9/4/08
to boost...@lists.boost.org
Scott Morgan <blumf <at> blueyonder.co.uk> writes:
>
> Adam Merz wrote:
> > Scott Morgan <blumf <at> blueyonder.co.uk> writes:
> >
> >> Is there an option to build the Boost libs with or without the wchar_t
> >> treated as built in (that whole /Zc:wchar_t mess MS dropped on us)
> >>
> >
> > How is being standards conformant 'a mess'?
> >
>
> When it's not default and half the libs you use have it and half don't.


FWIW, /Zc:wchar_t is the default in VC8 and VC9; if you're referring to VC7 or
VC7.1, I certainly agree with you.

Also, it's worth noting that the line number I referenced was for 1.36's
msvc.jam.

Reply all
Reply to author
Forward
0 new messages