Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.10.0
-
None
-
None
-
None
-
Windows XP, Visual Studio 2005
Description
Use of log4cxx::Level::ERROR fails with compilation error in some C++ source files, although DEBUG and INFO compile correctly.
error C2589 'constant' : illegal token on right side of '::'
I have tracked it down to the <wingdi.h> header file and managed to avoid the error by using the NOGDI definition. This is okay in my situation, but may cause others problems?
// fails
#undef NOGDI
#include <windows.h>
...
log4cxx::logstream* ls = new log4cxx::logstream(logger, log4cxx::Level::ERROR);
// works
#define NOGDI
#include <windows.h>
...
log4cxx::logstream* ls = new log4cxx::logstream(logger, log4cxx::Level::ERROR);
Chris