Compilation with QT5.0 and Mac Os 10.8



  • Hello all,

    I am writing an application with QT5 and Windows and this morning I am trying to build this application for Mac Os 10.8 but I am taking an error :

    /Users/csluikidikilest/Qt5.0.0/5.0.0/clang_64/include/QtCore/qisenum.h:53: erreur : token is not a valid binary operator in a preprocessor subexpression

    if __has_extension(is_enum)

        ~~~~~~~~~~~~~~~^
    

    I try to research google with error code and the file name (qisenum.h), I found some solution to update this file, but it is all ready up to date.

    Does someone found a solution to resolve this problem ?



  • I think the answer lies in the age of the clang version:
    http://comments.gmane.org/gmane.comp.lib.qt.user/4899



  • I have a similar error, although mine reads:

    @/Users/xxx/Qt5.2.0/5.2.0-beta1/clang_64/lib/QtGui.framework/Versions/5/Headers/qimage.h:52:24: error: token is not a valid binary operator in a preprocessor subexpression
    #if QT_DEPRECATED_SINCE(5, 0)
    ~~~~~~~~~~~~~~~~~~~^@

    This with the following version of clang
    @Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
    Target: x86_64-apple-darwin12.5.0
    Thread model: posix@

    I am using Qt Creator (not XCode) and I tried with Qt 5.0.1, Qt 5.0.2, Qt 5.1.1, Qt 5.2.0-beta1, obtaining the very same error each time.

    Is this still too outdated? I don't seem to be able to update to a newer version (using the xcode 5.0.1 "command-line tools" on Mountain Lion), should I try to recompile my own version of clang from source?

    Currently the only workable option to use Qt 5 i've found is to use GCC 4.2.



  • Solved it myself:

    I had a manually-compiled version of qt (4.8.3) that had installed links to its header folders in /usr/local/include. As I was manually including (INCLUDEPATH) within my .pro file, it was looking there instead of the proper Qt 5.x folders.

    Solved by removing the links in /usr/local/include. It now works perfectly!


Log in to reply
 

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