fatal error: QColor: No such file or directory
-
@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. -
Can you show the full command line for the compiler call that fails?
-
@SPlatten said in fatal error: QColor: No such file or directory:
-I/usr/include/qt5 -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore
Are these the directories where Qt's include files including for
QColor
are located?
How does this command line compare against one issued for a file which does find<QColor>
? -
@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 are you sure, that the subproject has this header marked as HEADER in the pro file ?
-
Also in addition to @JonB's questions:
if you try including another file in the same directory, say:
#include <QIcon>
do you get the same error for that file?
Also what happens if you try compiling a .cpp file instead of a .c file?@hskoglund said in fatal error: QColor: No such file or directory:
Also in addition to @JonB's questions:
if you try including another file in the same directory, say:
#include <QIcon>I asked the OP to do just this earlier on...!
-
@SPlatten said in fatal error: QColor: No such file or directory:
-I/usr/include/qt5 -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore
Are these the directories where Qt's include files including for
QColor
are located?
How does this command line compare against one issued for a file which does find<QColor>
? -
@hskoglund said in fatal error: QColor: No such file or directory:
Also in addition to @JonB's questions:
if you try including another file in the same directory, say:
#include <QIcon>I asked the OP to do just this earlier on...!
@JonB , QObject is included and that isn't a problem
[Edit] More specifics: The project build structure:
Top level .pro A sub-projects B more-sub-projects C
If I go to level C and build the project compiles without error, however at level B it does have the error, there is a pro file at each level.
-
@JonB , QObject is included and that isn't a problem
[Edit] More specifics: The project build structure:
Top level .pro A sub-projects B more-sub-projects C
If I go to level C and build the project compiles without error, however at level B it does have the error, there is a pro file at each level.
-
@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 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).