Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-31469

Failed to build application that uses QDateTime class with Visual C++ 11.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.0.2
    • Core: Date/Time
    • None
    • 1. Visual Studio Ultimate 2012 Update 2.
      2. Qt 5.0.2 built from sources as shared library.
      3. Qt Add-in 1.2.1

      Failed to build application that uses QDateTime class with Visual C++ 11.0 due to absence of macro NOMINMAX (Windows specific):

      1>d:\users\marat\documents\work\cpp\qt_5_0_2_msvc2012_shared\qtbase\include\qtcore\../../src/corelib/tools/qdatetime.h(123): warning C4003: not enough actual parameters for macro 'min'
      1>d:\users\marat\documents\work\cpp\qt_5_0_2_msvc2012_shared\qtbase\include\qtcore\../../src/corelib/tools/qdatetime.h(123): error C2589: '(' : illegal token on right side of '::'
      1>d:\users\marat\documents\work\cpp\qt_5_0_2_msvc2012_shared\qtbase\include\qtcore\../../src/corelib/tools/qdatetime.h(123): error C2059: syntax error : '::'
      

      If Qt needs NOMINMAX to be defined for building itself - that's ok. But I think that Qt shouldn't require this macro definition from users of Qt. Solution is very simple - make public headers of Qt independent of NOMINMAX (see qdatetime.h.patch).

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            mabrarov Marat Abrarov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes