QtCreator/Compiler cannot find header files.
-
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?
-
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).
-
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.exeWhen 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.
-
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)"
-
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 fileThere seems to be one "could not find qmake configuration file" for each source file.
-
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?
-
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 -
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.
-
[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)
-
Does it do this for all projects? (I.e., if you create a new project are you still seeing the same behavior?)
-
Yes, same behavior, even with the demo examples.
-
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.
-
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.
-