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. QtCreator/Compiler cannot find header files.
Forum Updated to NodeBB v4.3 + New Features

QtCreator/Compiler cannot find header files.

Scheduled Pinned Locked Moved Installation and Deployment
17 Posts 4 Posters 20.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.
  • P Offline
    P Offline
    paie
    wrote on last edited by
    #3

    Thanks for the advice, but how do I get QtCreator to find the include path again? That's most important to me right now, because I can't even build without it.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      paie
      wrote on last edited by
      #4

      When I hover the mouse over the header declarations, like ...

      #include <QtCore>

      ...the QtCreator gives me a mouseover message that says,

      No such file or directory.

      How can I fix this?

      1 Reply Last reply
      0
      • L Offline
        L Offline
        loladiro
        wrote on last edited by
        #5

        Are you using the right qmake in Qt Creator? When you hover your mouse over an entry in Settings -> Qt4, it should tell you where it expects the headers to be (QT_INSTALL_HEADERS).

        1 Reply Last reply
        0
        • P Offline
          P Offline
          paie
          wrote on last edited by
          #6

          Thanks again.

          In Options->Qt4-QtVersions, there are entries under "Auto Detected" and "Manual"

          The first entry under "Manual", is ...

          Version name: Qt 4.7.3 for Desktop - MSVC2008 (Qt SDK)
          qmake location: c:\qtsdk\desktop\qt\4.7.3\msvc2008\bin\qmake.exe

          When I hover over that entry, I see ...

          QT_INSTALL_HEADERS C:/qtsdk/desktop/qt/4.7.3/msvc2008/include

          ... which is a valid directory containing the header files.

          There must be some other setting I'm missing that connects that entry to my project/session. But I just don't know what it is.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            loladiro
            wrote on last edited by
            #7

            In the projects tab, you can select which version of Qt to use. Make sure it's "Qt 4.7.3 for Desktop – MSVC2008 (Qt SDK)"

            1 Reply Last reply
            0
            • P Offline
              P Offline
              paie
              wrote on last edited by
              #8

              A couple other things.

              Even though the project compiles and creates both debug and release executables, If I try to run them from the QtCreator, I get the message ...
              @
              Starting C:\Code\Projects\bits\bits-build-desktop\bits.exe...
              The process could not be started: The system cannot find the file specified.
              C:\Code\Projects\bits\bits-build-desktop\bits.exe exited with code 0
              @
              Why should QtCreator be looking in ..\bits-build-desktop for the .exe, when it should be looking in ..\bits-build-desktop\debug or release for it?
              If I try to add \debug to the build directory, I get a warning that the build must be at the same level as the source, and QtCreator creates two new directories, ..\debug and ..\release under ..\bits-build-desktop\debug.

              What is that?

              AND, I see these messages in the General Messages window, even though the build succeeds.

              c:/qtsdk/symbian/sdks/symbian3qt473/mkspecs/symbian-sbsv2/qmake.conf(8): 'option' is not a recognized test function
              c:/qtsdk/symbian/sdks/symbian1qt473/mkspecs/symbian-abld/qmake.conf(8): 'option' is not a recognized test function
              Could not find qmake configuration file
              Could not find qmake configuration file
              Could not find qmake configuration file
              Could not find qmake configuration file
              Could not find qmake configuration file
              Could not find qmake configuration file
              Could not find qmake configuration file
              Could not find qmake configuration file
              Could not find qmake configuration file
              Could not find qmake configuration file

              There seems to be one "could not find qmake configuration file" for each source file.

              1 Reply Last reply
              0
              • L Offline
                L Offline
                loladiro
                wrote on last edited by
                #9

                The build directory in QT Creator, is where you want your files to be placed. On Windows that includes the debug/release directories. Also, it seems like Qt Creator is trying to build your app for symbian. Did you mix up the directories when adding them to your PATH, so qt creator now uses the qmake for symbian?

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  paie
                  wrote on last edited by
                  #10

                  This is my current path. There is no mention of Qt in there.
                  @
                  PATH=C:\Perl\site\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program
                  Files\Common Files\Roxio Shared\DLLShared;c:\Program Files\Common Files\Roxio Shared\DLLShared;c:
                  \Program Files\Common Files\Roxio Shared\9.0\DLLShared;C:\Program Files\Hewlett-Packard\IAM\bin;C:
                  Program Files\ActivCard\ActivCard Gold\resources;C:\Program Files\Common Files\Ulead Systems\MPEG;C:
                  \Program Files\jZip;c:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\Program Files\OpenSSH\bi
                  n;C:\Program Files\QuickTime\QTSystem;C:\Program Files\Git\cmd;C:\Program Files\IDM Computer Soluti
                  ons\UltraEdit;C:\Program Files\IDM Computer Solutions\UltraCompare;C:\Program Files\OpenVPN\bin
                  @

                  What is the appropriate path to add to my system path?
                  QtSDK is installed at c:\QtSDK, and all the msvc2008 directories are under c:\QtSDK\Desktop\Qt\4.7.3\msvc2008

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    paie
                    wrote on last edited by
                    #11

                    Right now, QtCreator is crippled as an IDE. Can't find the headers, and the hover hints over the Qt types are gone.

                    And re-install did not change anything.

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      paie
                      wrote on last edited by
                      #12

                      [quote author="loladiro" date="1313322380"]In the projects tab, you can select which version of Qt to use. Make sure it's "Qt 4.7.3 for Desktop – MSVC2008 (Qt SDK)"[/quote]

                      Yes, it says ...

                      Qt 4.7.3 for Desktop - MSVC2008 (QtSDK)

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mlong
                        wrote on last edited by
                        #13

                        Does it do this for all projects? (I.e., if you create a new project are you still seeing the same behavior?)

                        Software Engineer
                        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                        1 Reply Last reply
                        0
                        • P Offline
                          P Offline
                          paie
                          wrote on last edited by
                          #14

                          Yes, same behavior, even with the demo examples.

                          1 Reply Last reply
                          0
                          • P Offline
                            P Offline
                            paie
                            wrote on last edited by
                            #15

                            I fear my QtCreator environment is hopelessly corrupted.

                            Who can tell me what the "vanilla' build environment is for QtCreator having the MSVC2008 engine resident on the system? I also have MinGW 4.4.

                            Nothing is working now. I can't build anything, the QtCreator cannot find its Headers, it's a real mess.

                            1 Reply Last reply
                            0
                            • P Offline
                              P Offline
                              paie
                              wrote on last edited by
                              #16

                              It is interesting that QtCreator can properly build my projects, while the QtCreator editor cannot locate the header files.

                              There must be a different environment variable for the QtCreator syntax editor. It's a great tool, when it's working, because of the hints and auto-completion.

                              I wish I knew what the problem is. If anyone has an idea about the correct settings for the editor, I would appreciate it.

                              1 Reply Last reply
                              0
                              • P Offline
                                P Offline
                                paie
                                wrote on last edited by
                                #17

                                This may be a bug.

                                https://bugreports.qt.nokia.com/browse/QTCREATORBUG-5599?focusedCommentId=161302#comment-161302

                                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