Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt5 wrong mkspec used in QtCreator
Forum Updated to NodeBB v4.3 + New Features

Qt5 wrong mkspec used in QtCreator

Scheduled Pinned Locked Moved Qt Creator and other tools
9 Posts 3 Posters 6.2k 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.
  • O Offline
    O Offline
    OlivierB
    wrote on last edited by
    #1

    Hi all,

    I have build a Qt5 under a Linux 64bits.
    Now I try to use it in QtCreator. But, even with the GCC x86_64 set and QMKSPECS set to linux-g++-64, the qmake build step indicates "qmake application.pro -r -spec linux-g++". And of course, it does not work at link time because Qt5 libs are 64bits...

    Anyone has the same problem.

    Thanks.

    Olivier.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      So you are using a 64bit linux os with a 64bit gcc and a 64bit Qt? linux-g++ is the correct mkspec for you then.

      Which version of Qt Creator is this by the way?

      1 Reply Last reply
      0
      • O Offline
        O Offline
        OlivierB
        wrote on last edited by
        #3

        Thanks Tobias for your answer.

        Ok. I use the QtCreator from the SDK, so it is 2.4.1.
        I was confused with the link error. I took the wrong road...
        My .pro contained Qt4 modules which of course are not the same for Qt5.

        So in the end, it is just that the current version of QtCreator seems not compatible with Qt5. I think this is normal?

        Olivier.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          AFAIK Qt Creator can build Qt5 applications.

          The wizards, etc. are not yet updated though: Qt5 is not out yet and was a long way of when we released the 2.4 version of Qt Creator. It made little sense back then to update the wizards since the rearrangement of modules and classes was not even done!

          Please try Qt Creator 2.5 (beta was just released) for Qt5 work. That should work better. Please "file bug reports":http://bugreports.qt-project.org/ if you run into trouble:-)

          1 Reply Last reply
          0
          • O Offline
            O Offline
            OlivierB
            wrote on last edited by
            #5

            I am able to build and run Qt5 application using QtCreator 2.4.1. As you say my problem came from the project creation wizard which still create project for Qt4, nothing abnormal here. So after manually update the .pro, the build works.

            The problem I have is that QtCreator only find includes from qtbase module and not for qtdeclarative module for example. I'll give a try to the 2.5 see if it works better.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              There should not have been changes with regards to creator finding header files in 2.5. Does your project build? If it does, then creator should be able to pick up the headers, too.

              1 Reply Last reply
              0
              • O Offline
                O Offline
                OlivierB
                wrote on last edited by
                #7

                It should not but it does make a difference. :)
                I have just switch to the 2.5 beta and now QtCreator find header files like QQuickView.
                My application compile on both version.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  stephenju
                  wrote on last edited by
                  #8

                  [quote author="OlivierB" date="1332500652"]The problem I have is that QtCreator only find includes from qtbase module and not for qtdeclarative module for example. I'll give a try to the 2.5 see if it works better.[/quote]

                  Qt 5 requires module names in the include path, like:
                  [code]#include <QtCore/QString>[/code]

                  This no longer works:

                  [code]#include <QString>[/code]

                  1 Reply Last reply
                  0
                  • O Offline
                    O Offline
                    OlivierB
                    wrote on last edited by
                    #9

                    [quote author="Stephen Chu" date="1332504450"]
                    Qt 5 requires module names in the include path, like:
                    [code]#include <QtCore/QString>[/code]

                    This no longer works:

                    [code]#include <QString>[/code][/quote]
                    Ok. My computer must by haunted!
                    For me, with the 2.5, I can use #include <QString> or #include <QQuickView> without a problem.
                    However, with the 2.4, I can't even write #include <QtQuick/QQuickView> as QtQuick/ is not found.

                    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