Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. OSX & Qt : bad issues
Forum Updated to NodeBB v4.3 + New Features

OSX & Qt : bad issues

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 2 Posters 4.5k Views 1 Watching
  • 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.
  • G Offline
    G Offline
    GoblE
    wrote on last edited by
    #1

    Hi,

    I have updated my Qt installation (with the update tool) and now I can't build my application on OSX (the same source code build on Linux).

    I have tried with :

    • 5.0.2 clang 64b
    • 5.1.0 clang 64b
    • 5.1.1 clang 64b
    • 5.2.0 clang 64b
    • 5.2.1 clang 64b

    Errors are not the same (but always about Qt header files), so I give you the bad issue only with the 5.2.1 :
    @
    In file included from sources/main/main.cpp:2:
    In file included from ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/QApplication:1:
    In file included from ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:56:
    In file included from /Users/peb/Qt/5.2.1/clang_64/lib/QtGui.framework/Headers/qguiapplication.h:47:
    /Users/peb/Qt/5.2.1/clang_64/lib/QtGui.framework/Headers/qinputmethod.h:89:5: error: unknown type name 'QLocale'
    QLocale locale() const;
    ^
    /Users/peb/Qt/5.2.1/clang_64/lib/QtGui.framework/Headers/qinputmethod.h:96:21: error: no type named 'InputMethodQueries' in namespace 'Qt'; did you mean 'InputMethodQuery'?
    void update(Qt::InputMethodQueries queries);
    ^~~~~~~~~~~~~~
    InputMethodQuery
    /usr/local/include/QtCore/qnamespace.h:1541:10: note: 'InputMethodQuery' declared here
    enum InputMethodQuery {
    ^
    In file included from sources/main/main.cpp:2:
    In file included from ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/QApplication:1:
    In file included from ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:56:
    /Users/peb/Qt/5.2.1/clang_64/lib/QtGui.framework/Headers/qguiapplication.h:92:12: error: unknown type name 'QWindowList'
    static QWindowList allWindows();
    ^
    /Users/peb/Qt/5.2.1/clang_64/lib/QtGui.framework/Headers/qguiapplication.h:93:12: error: unknown type name 'QWindowList'
    static QWindowList topLevelWindows();
    ^
    /Users/peb/Qt/5.2.1/clang_64/lib/QtGui.framework/Headers/qguiapplication.h:145:16: error: no type named 'ApplicationState' in namespace 'Qt'
    static Qt::ApplicationState applicationState();
    ~~~~^
    /Users/peb/Qt/5.2.1/clang_64/lib/QtGui.framework/Headers/qguiapplication.h:165:38: error: no type named 'ApplicationState' in namespace 'Qt'
    void applicationStateChanged(Qt::ApplicationState state);
    ~~~~^
    In file included from sources/main/main.cpp:2:
    In file included from ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/QApplication:1:
    ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:76:24: error: variable has incomplete type 'class Q_WIDGETS_EXPORT'
    class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
    ^
    ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:76:7: note: forward declaration of 'Q_WIDGETS_EXPORT'
    class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
    ^
    ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:76:37: error: expected ';' after top level declarator
    class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
    ^
    ;
    ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:76:39: error: expected unqualified-id
    class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
    ^
    ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:111:24: error: token is not a valid binary operator in a preprocessor subexpression
    #if QT_DEPRECATED_SINCE(5, 0)
    ~~~~~~~~~~~~~~~~~~~^
    ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:151:24: error: token is not a valid binary operator in a preprocessor subexpression
    #if QT_DEPRECATED_SINCE(5, 0)
    ~~~~~~~~~~~~~~~~~~~^
    ../../../../../../../../../../Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:181:24: error: token is not a valid binary operator in a preprocessor subexpression
    #if QT_DEPRECATED_SINCE(5, 0)
    ~~~~~~~~~~~~~~~~~~~^
    ...
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    make: *** [out/obj/main.o] Error 1
    01:39:30: Le processus "/usr/bin/make" s'est terminé avec le code 2.
    Erreur lors de la compilation/déploiement du projet camana4 (kit : Desktop Qt 5.2.1 clang 64bit)
    Lors de l'exécution de l'étape "Make"
    @

    I have seen an other post about OSX and Qt problems (http://qt-project.org/forums/viewthread/41862/), but me, I have installed Qt with the official installer and I know that I can build my source code on Linux (with Qt 5.x).

    This update was a disaster... And I don't speak about the new QtCreator 3.1.0 on OSX... really unusable, too many bugs... :(

    1 Reply Last reply
    0
    • hskoglundH Online
      hskoglundH Online
      hskoglund
      wrote on last edited by
      #2

      Hi, it looks like perhaps some parts of your Qt is still from 4.x.

      If you start QtCreator and create a new empty Qt Widgets app, does it build and run ok?

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GoblE
        wrote on last edited by
        #3

        Hi,

        thx for your help.

        I tried to create new empty Qt Widgets app, it works fine.

        When you say that some parts of my Qt is still from 4.x, you speak about my Qt installation or my Qt application?

        Because I can build my application with Qt 5.x on Linux and like you can see in the output compilation, there's only Qt 5.2.1 reference (./../../../../../../../../../Qt/5.2.1/ ...)

        1 Reply Last reply
        0
        • hskoglundH Online
          hskoglundH Online
          hskoglund
          wrote on last edited by
          #4

          Hmmm, since building a new Widgets app is ok, then it might be some stuff in your Qt application (like include files) that worked fine in Qt4 and works fine in Qt5 for Linux but not in Qt5 for OSX.

          Did you update your app from Qt4 to Qt5 on Linux and then copied it to OSX, or did you copy first?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GoblE
            wrote on last edited by
            #5

            The source code of my application is into a shared folder between OSX and the Linux VM, so it's the same code anytime.

            My application was "designed" with Qt5, but I have also planned support for Qt4, like is recommended by the Qt team.

            I'll study include files used by my application like you said, maybe I could find more informations.

            1 Reply Last reply
            0
            • hskoglundH Online
              hskoglundH Online
              hskoglund
              wrote on last edited by
              #6

              Using a shared folder saves time, but it might be a danger there.
              Reason is, while the .cpp, .h and .pro files are standard and shareable, the .pro.user file contains machine specific stuff like build and configuration directories, i.e. on OSX you are /Users/username/... and in Linux in /home/username/...

              1 Reply Last reply
              0
              • G Offline
                G Offline
                GoblE
                wrote on last edited by
                #7

                Yes I know, I delete the .pro.user file when I switch between Linux/OSX, like you said, it can be dangerous. When I work on Linux it's just to continue to develop my application, it's a backup solution :/

                1 Reply Last reply
                0
                • hskoglundH Online
                  hskoglundH Online
                  hskoglund
                  wrote on last edited by
                  #8

                  Interesting error, I looked again at the errors you got, and it for sure it's something about Qt's .h files not in sync on OSX (for example, the applicationState() function that's flagged as unknown is new for Qt 5.2),

                  Just guessing, maybe something isn't kosher with the file permissions in the shared folder? BTW, are you using shadow builds?

                  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