Fatal error: QtMqtt/qmqttglobal.h: No such file or directory
-
Hello. I am trying to install mqtt in linux. I have downloaded the source files from github. Qmake works fine, but make gives this error: fatal error: QtMqtt/qmqttglobal.h: No such file or directory. I have also searched for qmqttglobal.h and it is at its place. My operating system is Linux and my qt version is 5.12.4. What else should I try?
-
@20Stefan05 have you built and install the QtMqtt module?
-
@Pablo-J-Rogina, I don't think so.I have tried to build it in the qt creator, but it had many errors. How should I install and build the module?
-
@20Stefan05 You shouldn't use Qt Creator to compile mqtt, instead run the following in terminal:
git clone https://github.com/qt/qtmqtt.git cd qtmqtt qmake . make sudo make install
-
@eyllanesc I did that, but at running make, I get Fatal error: QtMqtt/qmqttglobal.h: No such file or directory
-
Hi,
Are you sure you are using the correct version of Qt to build that module ?
Do you have pearl installed ?
Did you checkout the correct branch ? -
You did not answer all questions.
Beside that, are you using the full path to qmake ?
-
Usually you would use the branch matching the Qt version you want to use.
How did you install Qt 5.12.4 ?
-
As I already wrote, use the full path to qmake. Otherwise you are going to use your distribution provided Qt.