Compiling boost::regex v4 with VC8 on Windows

Hi, In my current project boost::regex was used previously from version v3 (boost 1.30.2) and there was no problem. Because I use a third party SDK that contains boost 1.33.1 I want to use boost and regex (v4) from this SDK. In the project there is a source file that includes "boost/regex.hpp". In the release version the file compiles, but in the debug version I get a lot of errors like: char_regex_traits.hpp(34) : error C2976: 'boost::regex_traits' : too few template arguments /basic_regex.hpp(186) : error C2825: 'traits': must be a class or namespace when followed by '::' basic_regex.hpp(186) : error C2039: 'size_type' : is not a member of '`global namespace'' I have now removed the preprocessor definition '_DEBUG' from the VC8 project that contains the source file but this makes no difference. Is there any idea what's going on here ? Wolfgang

In my current project boost::regex was used previously from version v3 (boost 1.30.2) and there was no problem. Because I use a third party SDK that contains boost 1.33.1 I want to use boost and regex (v4) from this SDK. In the project there is a source file that includes "boost/regex.hpp". In the release version the file compiles, but in the debug version I get a lot of errors like:
char_regex_traits.hpp(34) : error C2976: 'boost::regex_traits' : too few template arguments /basic_regex.hpp(186) : error C2825: 'traits': must be a class or namespace when followed by '::' basic_regex.hpp(186) : error C2039: 'size_type' : is not a member of '`global namespace''
I have now removed the preprocessor definition '_DEBUG' from the VC8 project that contains the source file but this makes no difference. Is there any idea what's going on here ?
Nope, it's a new one on me, but please note that is a really old Boost version now. The only thing I can think of is that maybe you have the include paths set correctly in the release build, but mangled somehow in the debug build settings. HTH, John.

In my current project boost::regex was used previously from version v3 (boost 1.30.2) and there was no problem. Because I use a third party SDK that contains boost 1.33.1 I want to use boost and regex (v4) from this SDK. In the project there is a source file that includes "boost/regex.hpp". In the release version the file compiles, but in the debug version I get a lot of errors like:
char_regex_traits.hpp(34) : error C2976: 'boost::regex_traits' : too few template arguments /basic_regex.hpp(186) : error C2825: 'traits': must be a class or namespace when followed by '::' basic_regex.hpp(186) : error C2039: 'size_type' : is not a member of '`global namespace''
I have now removed the preprocessor definition '_DEBUG' from the VC8 project that contains the source file but this makes no difference. Is there any idea what's going on here ?
Nope, it's a new one on me, but please note that is a really old Boost version now.
The only thing I can think of is that maybe you have the include paths set correctly in the release build, but mangled somehow in the debug build settings.
HTH, John.
Thanks John, I have now found the answer: Someone had entered special settings for the source file, there was /D "BOOST_REGEX_NO_FWD" and /D "STRICT" in the debug version. This seemed to work with regex v3, but not with regex v4. Wolfgang
participants (2)
-
John Maddock
-
Wolfgang Goldbach