MS VC++ wchar_t type build Q

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

Scott Morgan
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.

Adam Merz wrote:
Scott Morgan
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

Scott Morgan
Adam Merz wrote:
Scott Morgan
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.
participants (2)
-
Adam Merz
-
Scott Morgan