Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-83

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

    XMLWordPrintableJSON

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

      Attachments

        Activity

          People

            carnold@apache.org Curt Arnold
            obe1line Chris Storah
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: