Saturday, 4 May 2013

Qt 5.0 on Mac OSX - "token is not a valid binary operator in a preprocessor subexpression"

/Users/arnebef/Qt5.0.2/5.0.2/clang_64/include/QtCore/qisenum.h:53: error: token is not a valid binary operator in a preprocessor subexpression
#    if __has_extension(is_enum)
        ~~~~~~~~~~~~~~~^

If you get the following error code when you are trying to compile a dummy project for Qt 5.0,
then you have a too old version of XCode. You have to install XCode anew (from the App Store), and then go to Xcode->Preferences->Downloads and install the command line tools. With that done you should be able to build new Qt programs.