qtmqtt build on windows
-
Using
git checkout <name of the branch/tag>
-
This post is deleted!
-
@SGaist I downloaded the correct version (for Qt 5.15) but now it returns a new error:
In file included from qmqttauthenticationproperties.cpp:30: qmqttauthenticationproperties.h:33:10: fatal error: QtMqtt/qmqttglobal.h: no such file or directory 33 | #include <QtMqtt/qmqttglobal.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [Makefile:528: .obj/qmqttauthenticationproperties.o] Error 1 make[2]: exit from directory «/home/furla/Scaricati/qtmqtt/src/mqtt» make[1]: *** [Makefile:47: sub-mqtt-make_first] Error 2 make[1]: exit from directory «/home/furla/Scaricati/qtmqtt/src» make: *** [Makefile:49: sub-src-make_first] Error 2
-
Did you cleanup before restarting the build ?
-
What do you mean with cleanup?
-
Following this thread https://forum.qt.io/topic/100705/how-can-i-use-the-qtmqtt-code/14 , I remove all the "QtMqtt" from the headers files, now I can build the project without errors.
On the other hand when I run the project, in the application output panel I get this error:10:41:49: Starting /home/furla/Qt/EDALAB/build-qtmqtt-Desktop_Qt_5_15_0_GCC_64bit-Debug/examples/mqtt/consolepubsub/qtmqtt_pub ... 10:41:49: The process failed to start. Either the invoked program "/home/furla/Qt/EDALAB/build-qtmqtt-Desktop_Qt_5_15_0_GCC_64bit-Debug/examples/mqtt/consolepubsub/qtmqtt_pub" is missing, or you may have insufficient permissions to invoke the program. 10:41:49: Cannot execute "/home/furla/Qt/EDALAB/build-qtmqtt-Desktop_Qt_5_15_0_GCC_64bit-Debug/examples/mqtt/consolepubsub/qtmqtt_pub": no such File or directory 10:41:49: /home/furla/Qt/EDALAB/build-qtmqtt-Desktop_Qt_5_15_0_GCC_64bit-Debug/examples/mqtt/consolepubsub/qtmqtt_pub exited with code -1
I looked into the folder and there are:
- MakeFile
*Makefile.qtmqtt_pub
*MakeFile.qtmqtt_sub
And if I use the command make in this folder I get this error:
In file included from /home/furla/Qt/EDALAB/qtmqtt-5.15/examples/mqtt/consolepubsub/main_pub.cpp:51: /home/furla/Qt/EDALAB/qtmqtt-5.15/examples/mqtt/consolepubsub/configuration.h:59:10: fatal error: QMqttClient: no such File or directory 59 | #include <QMqttClient> | ^~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile.qtmqtt_pub:719: .obj/main_pub.o] Error 1 make[1]: exit from directory «/home/furla/Qt/EDALAB/build-qtmqtt-Desktop_Qt_5_15_0_GCC_64bit-Debug/examples/mqtt/consolepubsub» make: *** [Makefile:61: sub-qtmqtt_pub-pro-install_subtargets-ordered] Error 2
- MakeFile
-
What do you mean with cleanup?
@AndreaFurlani said in qtmqtt build on windows:
What do you mean with cleanup?
Nuke the build folder to ensure there's no stuff from your failed attempt that will influence this new one.
Then ensure you have all the required tools to build Qt from git since you cloned the sources from there. Since you are on Linux, it is likely the case but better check then guess.
-
@AndreaFurlani said in qtmqtt build on windows:
What do you mean with cleanup?
Nuke the build folder to ensure there's no stuff from your failed attempt that will influence this new one.
Then ensure you have all the required tools to build Qt from git since you cloned the sources from there. Since you are on Linux, it is likely the case but better check then guess.
@SGaist Ok I already deleted everything before to retry and as I described above I'm getting a new error.
I think I have all the right tools installed and also the Qt Creator options should be ok since I can run every example project without problems.
Moreover, instead of using the command clone, I maually downloaded the .zip folder from git corresponding to my Qt version -
Can you give what your actual state is now ?
Did you build the module successfully ?
If so, did you call the equivalent of make install ? -
For other searchers!
There is a dependency package, at least on RPi by the name of:
qt5base-private-dev
in order to build qtmqtt.
@SGaist , thanks for the prompt on
git checkout <version>
as I keep forgetting that detail when seeking a specific version.