Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "token is not a valid binary operator in a preprocessor subexpression"

Tags:

c++

qt

qt5

if I build and run a project, basically a stub generated by the Qt framework on Mac OS 10.6, I get this error output:

/Users/home/Qt5.0.1/5.0.1/clang_64/include/QtCore/qisenum.h:53: Error:token is not a valid binary operator in a preprocessor subexpression
#    if __has_extension(is_enum)
    ~~~~~~~~~~~~~~~^

I can´t find a solution to this, although I read that other Mac users seem to have the same problem. Anyone knows how to solve this?

like image 910
最白目 Avatar asked Feb 26 '26 20:02

最白目


1 Answers

I have found the solution. Just copy the latest qisenum.h file from here and replace it in clang_64/include/QtCore folder in your Qt creator installation, it will work fine.

like image 135
get Avatar answered Feb 28 '26 09:02

get