QtMqtt build
-
I am trying to use QTMQTT in my project. I have successfully built a library, but problems occur when I try to include it in my project or run provided examples. I am using Qt 5.15.2 MinQW 64 on a windows machine.
Steps taken:
- Download matching lib
- C:\qtmqtt-5.15.2> C:\Qt\5.15.2\mingw81_64\bin\qmake -r
- Make
- Make install
C:\qtmqtt-5.15.2>make install cd src\ && ( if not exist Makefile C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -o Makefile C:\qtmqtt-5.15.2\src\src.pro ) && C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile install make[1]: Entering directory 'C:/qtmqtt-5.15.2/src' cd mqtt\ && ( if not exist Makefile C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -o Makefile C:\qtmqtt-5.15.2\src\mqtt\mqtt.pro ) && C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile install make[2]: Entering directory 'C:/qtmqtt-5.15.2/src/mqtt' C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile.Release install make[3]: Entering directory 'C:/qtmqtt-5.15.2/src/mqtt' copy /y ..\..\lib\Qt5Mqtt.dll C:\Qt\5.15.2\mingw81_64\bin\Qt5Mqtt.dll 1 file(s) copied. C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\lib\Qt5Mqtt.dll.debug C:\Qt\5.15.2\mingw81_64\lib\Qt5Mqtt.dll.debug C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install sed -e "s,C:/qtmqtt-5.15.2/lib,$$[QT_INSTALL_LIBS],g" -e "s,C:\\\\qtmqtt-5.15.2\\\\lib,$$[QT_INSTALL_LIBS],gi" -e "s,C:/Qt/5.15.2/mingw81_64/lib,$$[QT_INSTALL_LIBS],g" -e "s,C:\\\\Qt\\\\5.15.2\\\\mingw81_64\\\\lib,$$[QT_INSTALL_LIBS],gi" ..\..\lib\Qt5Mqtt.prl > C:\Qt\5.15.2\mingw81_64\lib\Qt5Mqtt.prl C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install sed -e "s,C:/qtmqtt-5.15.2/lib,C:/Qt/5.15.2/mingw81_64/lib,g" -e "s,C:\\\\qtmqtt-5.15.2\\\\lib,C:\\\\Qt\\\\5.15.2\\\\mingw81_64\\\\lib,gi" ..\..\lib\pkgconfig\Qt5Mqtt.pc > C:\Qt\5.15.2\mingw81_64\lib\pkgconfig\Qt5Mqtt.pc copy /y ..\..\lib\libQt5Mqtt.a C:\Qt\5.15.2\mingw81_64\lib\libQt5Mqtt.a 1 file(s) copied. C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\include\QtMqtt\QtMqttDepends C:\Qt\5.15.2\mingw81_64\include\QtMqtt\QtMqttDepends C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\mkspecs\modules-inst\qt_lib_mqtt.pri C:\Qt\5.15.2\mingw81_64\mkspecs\modules\qt_lib_mqtt.pri C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\mkspecs\modules-inst\qt_lib_mqtt_private.pri C:\Qt\5.15.2\mingw81_64\mkspecs\modules\qt_lib_mqtt_private.pri C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\lib\cmake\Qt5Mqtt\Qt5MqttConfig.cmake C:\Qt\5.15.2\mingw81_64\lib\cmake\Qt5Mqtt\Qt5MqttConfig.cmake C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\lib\cmake\Qt5Mqtt\Qt5MqttConfigVersion.cmake C:\Qt\5.15.2\mingw81_64\lib\cmake\Qt5Mqtt\Qt5MqttConfigVersion.cmake make[3]: Leaving directory 'C:/qtmqtt-5.15.2/src/mqtt' make[2]: Leaving directory 'C:/qtmqtt-5.15.2/src/mqtt' make[1]: Leaving directory 'C:/qtmqtt-5.15.2/src'
I assume that installation is successful, but when I try to #include <QMqttClient> or <QtMqtt/QMqttClient> in a project I have an error "file not found" (I added QT += mqtt to pro file). When inspecting a folder, it appears that there is only one file, which is <QtMqtt/QtMqttDepends> nothing else. Did I miss any important step when building qtmqtt?.
-
I am trying to use QTMQTT in my project. I have successfully built a library, but problems occur when I try to include it in my project or run provided examples. I am using Qt 5.15.2 MinQW 64 on a windows machine.
Steps taken:
- Download matching lib
- C:\qtmqtt-5.15.2> C:\Qt\5.15.2\mingw81_64\bin\qmake -r
- Make
- Make install
C:\qtmqtt-5.15.2>make install cd src\ && ( if not exist Makefile C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -o Makefile C:\qtmqtt-5.15.2\src\src.pro ) && C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile install make[1]: Entering directory 'C:/qtmqtt-5.15.2/src' cd mqtt\ && ( if not exist Makefile C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -o Makefile C:\qtmqtt-5.15.2\src\mqtt\mqtt.pro ) && C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile install make[2]: Entering directory 'C:/qtmqtt-5.15.2/src/mqtt' C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -f Makefile.Release install make[3]: Entering directory 'C:/qtmqtt-5.15.2/src/mqtt' copy /y ..\..\lib\Qt5Mqtt.dll C:\Qt\5.15.2\mingw81_64\bin\Qt5Mqtt.dll 1 file(s) copied. C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\lib\Qt5Mqtt.dll.debug C:\Qt\5.15.2\mingw81_64\lib\Qt5Mqtt.dll.debug C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install sed -e "s,C:/qtmqtt-5.15.2/lib,$$[QT_INSTALL_LIBS],g" -e "s,C:\\\\qtmqtt-5.15.2\\\\lib,$$[QT_INSTALL_LIBS],gi" -e "s,C:/Qt/5.15.2/mingw81_64/lib,$$[QT_INSTALL_LIBS],g" -e "s,C:\\\\Qt\\\\5.15.2\\\\mingw81_64\\\\lib,$$[QT_INSTALL_LIBS],gi" ..\..\lib\Qt5Mqtt.prl > C:\Qt\5.15.2\mingw81_64\lib\Qt5Mqtt.prl C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install sed -e "s,C:/qtmqtt-5.15.2/lib,C:/Qt/5.15.2/mingw81_64/lib,g" -e "s,C:\\\\qtmqtt-5.15.2\\\\lib,C:\\\\Qt\\\\5.15.2\\\\mingw81_64\\\\lib,gi" ..\..\lib\pkgconfig\Qt5Mqtt.pc > C:\Qt\5.15.2\mingw81_64\lib\pkgconfig\Qt5Mqtt.pc copy /y ..\..\lib\libQt5Mqtt.a C:\Qt\5.15.2\mingw81_64\lib\libQt5Mqtt.a 1 file(s) copied. C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\include\QtMqtt\QtMqttDepends C:\Qt\5.15.2\mingw81_64\include\QtMqtt\QtMqttDepends C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\mkspecs\modules-inst\qt_lib_mqtt.pri C:\Qt\5.15.2\mingw81_64\mkspecs\modules\qt_lib_mqtt.pri C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\mkspecs\modules-inst\qt_lib_mqtt_private.pri C:\Qt\5.15.2\mingw81_64\mkspecs\modules\qt_lib_mqtt_private.pri C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\lib\cmake\Qt5Mqtt\Qt5MqttConfig.cmake C:\Qt\5.15.2\mingw81_64\lib\cmake\Qt5Mqtt\Qt5MqttConfig.cmake C:\Qt\5.15.2\mingw81_64\bin\qmake.exe -install qinstall C:\qtmqtt-5.15.2\lib\cmake\Qt5Mqtt\Qt5MqttConfigVersion.cmake C:\Qt\5.15.2\mingw81_64\lib\cmake\Qt5Mqtt\Qt5MqttConfigVersion.cmake make[3]: Leaving directory 'C:/qtmqtt-5.15.2/src/mqtt' make[2]: Leaving directory 'C:/qtmqtt-5.15.2/src/mqtt' make[1]: Leaving directory 'C:/qtmqtt-5.15.2/src'
I assume that installation is successful, but when I try to #include <QMqttClient> or <QtMqtt/QMqttClient> in a project I have an error "file not found" (I added QT += mqtt to pro file). When inspecting a folder, it appears that there is only one file, which is <QtMqtt/QtMqttDepends> nothing else. Did I miss any important step when building qtmqtt?.
-
Do You mean .h from cloned repo?
EDIT: I'll elaborate, building and linking 3rd party libs is confusing me(still noob at that part). I cloned qtmqtt repo then build it using "make". Now i have cloned repo polder E:/qtmqtt-5.15.2 and build folder
Cloned repo contains headers(first image), build directory does not. When I explore Qt built in libraries I can see that every .h file has a corresponding file without extension (example QTCharts)
Shouldn't I have a similar file structure in my built folder? -
Hi,
Might be a silly question but did you checkout the 5.15.2 branch before building ?
-
SGaist pointed me into the right direction. Simply downloading branch from github (even that it says 5.15.2) and running "make" does not work. Quick solution if someone has the same problem:
make sure perl is instaledgit clone https://github.com/qt/qtmqtt
cd "to cloned repo"
git checkout -b qtmatt-5.x.x
git branch // make sure branch exists
git clone https://github.com/qt/qtmqtt.git && git checkout v5.x.xThen you can "make" "make install". And now you should have all necessary files
-
The default branch when you clone Qt is the dev branch which is for Qt 6 currently.