Log4cxx
  1. Log4cxx
  2. LOGCXX-83

log4cxx::Level::ERROR fails to compile when GDI enabled

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Chris Storah
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development