Regex compilation failure with MSVC .NET 2002 and bjam
Dear all,
I am trying to build the regex library from boost 1.33 release with Visual C++ .NET
2002 and bjam.
I constantly get this error (while trying to build it with ICU and without).
my command line is:
bjam "--with-regex" "-sTOOLS=vc7" "--prefix=E:\projects\Automation\thirdparty\boost"
"--builddir=E:\projects\Automation\thirdparty\boost\build" "-sHAVE_ICU=0"
"-sICU_PATH=E:\projects\Automation\thirdparty\icu\source" install
I was trying to switch -sHAVE_ICU option between 0 and 1 and always got this output
for regex cpp files.
The error(s) is in German (I don't know why MS decided to translate C++ compiler to
German, but I have no other alternative at the moment and suffer very much with it
as well...).
The error means:
cannot form a qualified name (=Ein qualifizierter Name kann nicht gebildet werden)
see reference to class template instantiation
boost::re_detail::regex_iterator_traits<T>' being
compiled (=Siehe Verweis auf Instantiierung der kompilierten Klassenvorlage)
Full output is:
vc-C++ E:\projects\Automation\thirdparty\boost\build\bin\boost\libs\regex\build\
libboost_regex.lib\vc7\release\threading-multi\icu.obj
cl : Befehlszeile warning D4029 : Die Optimierung ist im Standardcompiler nicht
verf?gbar.
icu.cpp
E:\projects\Automation\thirdparty\boost_1_33_0\boost\regex\v4\iterator_traits.hp
p(34) : error C2825: 'T::iterator_category': Ein qualifizierter Name kann nicht
gebildet werden
E:\projects\Automation\thirdparty\boost_1_33_0\boost\regex\v4\sub_match.
hpp(31) : Siehe Verweis auf Instantiierung der kompilierten Klassenvorlage 'boos
t::re_detail::regex_iterator_traits<T>'
with
[
T=const int *
]
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\vector(259) :
Siehe Verweis auf Instantiierung der kompilierten Klassenvorlage 'boost::sub_mat
ch<BidiIterator>'
with
[
BidiIterator=const int *
]
E:\projects\Automation\thirdparty\boost_1_33_0\boost\regex\v4\regex_form
at.hpp(34) : Siehe Verweis auf Instantiierung der kompilierten Klassenvorlage 's
td::vector<_Ty,_Ax>'
with
[
_Ty=boost::sub_match
I was trying to switch -sHAVE_ICU option between 0 and 1 and always got this output for regex cpp files.
The bjam build script doesn't currently care what value HAVE_ICU is set to, if the variable is set then ICU support is enabled, so to build without ICU support just omit the -sHAVE_ICU option from the command line. I can reproduce the problem with VC7 and ICU support turned on. The immediate errors are easy enough to fix, but I've come up against some other problems that are harder to fix with this compiler - basically it's too broken to do what I need it to do, I'm sure there is a fix, but it eludes me at present. I'll come back to you if I happen to have a brainwave at get it working! John.
Does someone know what is the problem and how I can fix it?
I'm attaching a rather large patch that allows regex to be built with ICU support when using a broken compiler (just VC6/VC7 really), this will also be going into cvs soon. Regards, John.
participants (2)
-
John Maddock
-
Ovanes Markarian