Compilation error in qdatetime



  • Hi
    I amusing Qt5 with Visual Studio and one of my projects is giving the following error
    @
    c:\qt\qt5.1.1\5.1.1\msvc2012\include\qtcore\qdatetime.h(121): error C2589: '(' : illegal token on right side of '::'
    1>c:\qt\qt5.1.1\5.1.1\msvc2012\include\qtcore\qdatetime.h(121): error C2059: syntax error : '::'
    1> moc_EventSimulator.cpp
    @

    I can get a successful compilation by adding 'NOMINMAX' to the list of pre processor macros

    I would be grateful if someone could explain why this error occurs

    Thanks


  • Lifetime Qt Champion

    Hi,

    Do you have any functions that are named min/max ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.