fatal error: QColor: No such file or directory
-
@SPlatten said in fatal error: QColor: No such file or directory:
why would one project find it and another doesn't?
Because those are two different projects with own pro files if I understood you correctly.
If you use subdirs project type then add "QT += gui" in the subprojects pro files where QColor is included (directly or via other header files). -
@SPlatten Please do a complete rebuild after changing pro file (delete build folder, run qmake, build).
And please, if you want to tell the Qt version you're using do not post what "About QtCreator" dialog is showing - it only tells other qhat Qt version was used to build QtCreator... -
@SPlatten Please do a complete rebuild after changing pro file (delete build folder, run qmake, build).
And please, if you want to tell the Qt version you're using do not post what "About QtCreator" dialog is showing - it only tells other qhat Qt version was used to build QtCreator... -
@SPlatten Please do a complete rebuild after changing pro file (delete build folder, run qmake, build).
And please, if you want to tell the Qt version you're using do not post what "About QtCreator" dialog is showing - it only tells other qhat Qt version was used to build QtCreator... -
@jsulm , I've done:
make clean make depend make
Still getting the same error. I don't know where the build folder is, any suggestion on how to locate it?
[Edit] found the build folder it was hidden.
-
@SPlatten You forgot qmake.
And as I wrote: delete build folder or its content including hidden files, run qmake then make... -
@SPlatten said in fatal error: QColor: No such file or directory:
I can run qmake-qt5
Then do so, or use absolute path to qmake you want to use...
-
@SPlatten said in fatal error: QColor: No such file or directory:
I can run qmake-qt5
Then do so, or use absolute path to qmake you want to use...
-
I have added a header to the project that starts off with:
./../include/ASVscm/services/vehicle/dataMgmt.H:13:10: fatal error: QColor: No such file or directory
And is that the file into which you have added your
#include <QColor>
? Since you do not say we do not know....Start by putting a
#include <QColor>
directly into one of your local.cpp
or.h
files in the current folder and trying to compile (without that bad.h
file). Does that work or error? Then we know whether it is somehow to do with thedataMgmt.H
file or not.... -
I have added a header to the project that starts off with:
./../include/ASVscm/services/vehicle/dataMgmt.H:13:10: fatal error: QColor: No such file or directory
And is that the file into which you have added your
#include <QColor>
? Since you do not say we do not know....Start by putting a
#include <QColor>
directly into one of your local.cpp
or.h
files in the current folder and trying to compile (without that bad.h
file). Does that work or error? Then we know whether it is somehow to do with thedataMgmt.H
file or not.... -
@JonB , same result:
client.C:11:10: fatal error: QColor: No such file or directory #include <QColor> ^~~~~~~~ compilation terminate
@SPlatten
So maybe you do not have the necessary files in the Qt installation area, or it's using a different Qt installation area from what you think it should....- Try different
#include <...>
statements using something else thanQColor
. Is itQColor
only, or are others not found? - Create a brand new, standalone, tiny project, not the whole project you are using now. Does it work or fail there?
- Try different
-
@JonB , same result:
client.C:11:10: fatal error: QColor: No such file or directory #include <QColor> ^~~~~~~~ compilation terminate
-
@SPlatten
So maybe you do not have the necessary files in the Qt installation area, or it's using a different Qt installation area from what you think it should....- Try different
#include <...>
statements using something else thanQColor
. Is itQColor
only, or are others not found? - Create a brand new, standalone, tiny project, not the whole project you are using now. Does it work or fail there?
@JonB , the structure of this project contains many sub-projects each with they're own .pro files. I've search all the projects for the same inclusion:
grep -Rnw ./ -e "#include <QColor>"
And I have found other instances, then checked the .pro content for these and they don't appear to be any different.
I know this isn't logical, if I go to the local directory containing the .pro for the project I'm having difficulty with and execute:
make clean make depend make
It builds with no errors, its the same process from the parent that is when I get the error.
- Try different
-
@JonB , the structure of this project contains many sub-projects each with they're own .pro files. I've search all the projects for the same inclusion:
grep -Rnw ./ -e "#include <QColor>"
And I have found other instances, then checked the .pro content for these and they don't appear to be any different.
I know this isn't logical, if I go to the local directory containing the .pro for the project I'm having difficulty with and execute:
make clean make depend make
It builds with no errors, its the same process from the parent that is when I get the error.
@SPlatten said in fatal error: QColor: No such file or directory:
And I have found other instances, then checked the .pro content for these and they don't appear to be any different.
Please explain things clearly! "don't appear to be any different." might mean they have the same line and they (a) do work without the error or (b) do not work and show the same error .....
Anyway, I can only suggest you discover the exact compilation command-line being used.
#include <...>
should only look in system directories. Are these somehow different for the faulting case, that is all I can think of. -
@SPlatten said in fatal error: QColor: No such file or directory:
And I have found other instances, then checked the .pro content for these and they don't appear to be any different.
Please explain things clearly! "don't appear to be any different." might mean they have the same line and they (a) do work without the error or (b) do not work and show the same error .....
Anyway, I can only suggest you discover the exact compilation command-line being used.
#include <...>
should only look in system directories. Are these somehow different for the faulting case, that is all I can think of.