Build boost on msvc7.1 without native wchar_t

Hi!
I try to compile boost using bjam and toolset=msvc-7.1. To comply with the
rest of our libraries I need boost to build without the native wchar_t type.
So far none of the solutions I have found seem to work
("snative-wchar_t=off", "-sBUILD=

matthias_0 wrote:
Hi!
I try to compile boost using bjam and toolset=msvc-7.1. To comply with the rest of our libraries I need boost to build without the native wchar_t type.
So far none of the solutions I have found seem to work ("snative-wchar_t=off", "-sBUILD=
off") In boost\tools\v2\tools\msvc.jam I found a line that adds /Zc:wchar_t to the CFLAGS. Removing that entry didn't help either.
I imagine because native wchar_t is now the default -- you would have to replace that option with the one that explicitly calls for non-native wchar_t. - Volodya

Vladimir Prus-3 wrote:
matthias_0 wrote:
I try to compile boost using bjam and toolset=msvc-7.1. To comply with the rest of our libraries I need boost to build without the native wchar_t type.
So far none of the solutions I have found seem to work ("snative-wchar_t=off", "-sBUILD=
off") In boost\tools\v2\tools\msvc.jam I found a line that adds /Zc:wchar_t to the CFLAGS. Removing that entry didn't help either.
I imagine because native wchar_t is now the default -- you would have to replace that option with the one that explicitly calls for non-native wchar_t.
In VC 7.1 there is no explicit option to switch of native wchar_t (as opposed to VC8 and newer, where a /Zc:wchar_t- exists). So as long as some default mechanism in boost build adds the native wchar option, there is no way to unset it, or is there? Matthias -- View this message in context: http://www.nabble.com/Build-boost-on-msvc7.1-without-native-wchar_t-tp235397... Sent from the Boost - Users mailing list archive at Nabble.com.

matthias_0 wrote:
Vladimir Prus-3 wrote:
matthias_0 wrote:
I try to compile boost using bjam and toolset=msvc-7.1. To comply with the rest of our libraries I need boost to build without the native wchar_t type.
So far none of the solutions I have found seem to work ("snative-wchar_t=off", "-sBUILD=
off") In boost\tools\v2\tools\msvc.jam I found a line that adds /Zc:wchar_t to the CFLAGS. Removing that entry didn't help either.
I imagine because native wchar_t is now the default -- you would have to replace that option with the one that explicitly calls for non-native wchar_t.
In VC 7.1 there is no explicit option to switch of native wchar_t (as opposed to VC8 and newer, where a /Zc:wchar_t- exists). So as long as some default mechanism in boost build adds the native wchar option,
You said above you are hacking that mechanism. Specifically, this line in msvc.jam: toolset.flags $(toolset).compile CFLAGS $(conditions) : /Zc:forScope /Zc:wchar_t ; This is the only place where this option is added. If you removed it there, did you cleaned & rebuilt everything? (Use bjam --clean). You can use "bjam -n" to see the commands that are executed, and check if that option is still passed or not. - Volodya
participants (2)
-
matthias_0
-
Vladimir Prus