Failing to load modules 5.4.1[SOLVED]
-
I'm trying to do my first project in Qt and finding it very simple and intuitive so far, but when I try to build my project I get the following error:
:-1: error: Unknown module(s) in QT: core gui declarative quickI've searched google but haven't gotten any definitive answers there. I've tried doing a fresh install with no luck. Primarily I run Windows 8.1, but I've tried in Kubuntu as well with the same error. I'm including a .pri file which declares all the modules like so:
QT += core gui greaterThan(QT_VERSION, 4.7): QT += declarative greaterThan(QT_VERSION, 5.0): QT += quick
Is there something missing in my installs or is there some setting that need to be changed?
-
I'm trying to do my first project in Qt and finding it very simple and intuitive so far, but when I try to build my project I get the following error:
:-1: error: Unknown module(s) in QT: core gui declarative quickI've searched google but haven't gotten any definitive answers there. I've tried doing a fresh install with no luck. Primarily I run Windows 8.1, but I've tried in Kubuntu as well with the same error. I'm including a .pri file which declares all the modules like so:
QT += core gui greaterThan(QT_VERSION, 4.7): QT += declarative greaterThan(QT_VERSION, 5.0): QT += quick
Is there something missing in my installs or is there some setting that need to be changed?
@Narcoleptic
Hi and welcome to devnetThis sounds strange to me. However, typically those statements you will find in the main .pro file and not in an included .pri file.
Try to place those statements in your .pro file. -
I commented out those lines in the .pri and added this in the .pro
QT += core gui quick declarative
With the same result, tried putting them on separate lines as well with QT += for each individual line. Still no difference.
-
I commented out those lines in the .pri and added this in the .pro
QT += core gui quick declarative
With the same result, tried putting them on separate lines as well with QT += for each individual line. Still no difference.
@Narcoleptic
Are you using Qt creator and run the qmake from there? -
Yes, I use Qt Creator and go to Build->Build All
-
Yes, I use Qt Creator and go to Build->Build All
@Narcoleptic
Do you have only one project?
Goto to the "project" pane on left and select (one of) the project and do a right mouse click. From there you can "run qmake" and do similarly a "Rebuild all" after wards.
If you really have different projects you can do this for every single project. With this procedure, you will also find if you are looking at the right place for a problem. -
It is only one project. I have one .pro file and one main.cpp. Then in the .pro I use
include (otherProject.pri)
, and in the main I include a header from the other project. That's all the project interactions I have.Running qmake gives the same error message.
-
To add to this, I tried one of the examples in Qt Creator, they seem to produce the same error.
-
For Windows I downloaded the .exe and ran the setup normally with default settings except that I put the install directory in "C:\Program Files (x86)\Qt" instead of "C:\Qt" which was proposed. In Kubuntu I don't remember if I used Muon Software Center or apt-get.
-
There has been a bug in qmake, that caused the error you described if there are whitespaces in you qmake path. If your kits are showing a correct installed qt version for your compiler my only suggestion is to try to install qt in a folder not containing whitespaces.
-
That did the trick. Thank you.