Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. C2589: '(' : illegal token on right side of '::'

C2589: '(' : illegal token on right side of '::'

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 13.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rizoritis
    wrote on last edited by
    #1

    Hello,

    I have encountered the same problem found here, and tried all of the recommended solutions:
    http://qt-project.org/forums/viewthread/22133

    qdatetime.h gives a syntax error at the line:
    static inline qint64 nullJd() { return std::numeric_limits<qint64>::min(); }

    The error is:
    C:\Qt\Qt5.2.1\5.2.1\msvc2012_64_opengl\include\QtCore\qdatetime.h:122: error: C2589: '(' : illegal token on right side of '::'

    I have windows.h declared in a header file (which is probably a bad idea), but have included before it:
    #define NOMINMAX #include <limits>

    Also in the .pro file I have included DEFINES += NOMINMAX

    For some reason this error still persists. Any ideas?

    Thanks!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      Did you define NOMINMAX before windows.h ?

      @
      #define NOMINMAX
      #include <windows.h>
      @

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andreyc
        wrote on last edited by
        #3

        take a look on "this":http://stackoverflow.com/a/2561377

        try to undef min and max before using min and max from the <limits>

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved