Problem compiling Windows C++ code wit regex
Hi all, I try to compile some older C++ Code with your RegEx class and got in some source code problems with some ambiguity I believe between the std and the global namespace. I followed the include hierarchie starting from "boost/regex.h" down to "boost\config\stdlib\dinkumware.hpp" and here was my first problem, why this stdlib implementation was selected, I don't think, that this is the normal implementation for "VC++ 6.0 SP6" what I am using!? The errors I got are located in some windows system header and look like this only in one source file: : d:\programme\microsoft visual studio\vc98\include\objidl.h(9901) : error C2668: 'memset' : ambiguous call to overloaded function d:\programme\microsoft visual studio\vc98\include\objbase.h(435) : error C2668: 'memcmp' : ambiguous call to overloaded function d:\programme\microsoft visual studio\vc98\include\objbase.h(459) : error C2668: 'memcmp' : ambiguous call to overloaded function Error executing cl.exe. Any idea what kind of define can cause this problem? I visit every included headerfile and look also in the expanded preprocessor code (*.i file) and didn't see exactly what happend, so have somebody an idea? Thanks for your help Arno
I try to compile some older C++ Code with your RegEx class and got in some source code problems with some ambiguity I believe between the std and the global namespace. I followed the include hierarchie starting from "boost/regex.h" down to "boost\config\stdlib\dinkumware.hpp" and here was my first problem, why this stdlib implementation was selected, I don't think, that this is the normal implementation for "VC++ 6.0 SP6" what I am using!?
Yes it is, Dinkumware supply the std lib that MS ship with their compiler.
The errors I got are located in some windows system header and look like this only in one source file: : d:\programme\microsoft visual studio\vc98\include\objidl.h(9901) : error C2668: 'memset' : ambiguous call to overloaded function d:\programme\microsoft visual studio\vc98\include\objbase.h(435) : error C2668: 'memcmp' : ambiguous call to overloaded function d:\programme\microsoft visual studio\vc98\include\objbase.h(459) : error C2668: 'memcmp' : ambiguous call to overloaded function Error executing cl.exe.
Any idea what kind of define can cause this problem? I visit every included headerfile and look also in the expanded preprocessor code (*.i file) and didn't see exactly what happend, so have somebody an idea?
Yes, that occurs if you have a using namespace std; statement in your code, and you are using Microsoft Visual C++ 6 (it's actually a compiler bug). Removing (or possibly moving until after all your includes, or just re-ordering your includes) the using statement will fix the issue. John.
participants (2)
-
arno.schaefer@sqs.de
-
John Maddock