Qt's qmqtt comiplation issues on Windows 10

Deadly 提交于 2019-12-11 05:33:18

问题


I am trying to develop a simple POC using qmqtt but this module is not available in the Qt lib path. I have the latest Qt version installed, still it's not there. So, I am trying to compile it under Windows using mingw32 and I get undefined references from the qmqtt's source.

Qt version:5.11.2

Below is the compilation log:

E:\Xavier\qmqtt>mingw32-make
cd src\ && ( if not exist Makefile E:\Xavier\Qt\5.11.2\mingw53_32\bin\qmake.exe -o Makefile E:\Xavier\qmqtt\src\src.pro ) && mingw32-make -f Makefile
mingw32-make[1]: Entering directory 'E:/Xavier/qmqtt/src'
cd mqtt\ && ( if not exist Makefile E:\Xavier\Qt\5.11.2\mingw53_32\bin\qmake.exe -o Makefile E:\Xavier\qmqtt\src\mqtt\mqtt.pro ) && mingw32-make -f Makefile
mingw32-make[2]: Entering directory 'E:/Xavier/qmqtt/src/mqtt'
mingw32-make -f Makefile.Release all
mingw32-make[3]: Entering directory 'E:/Xavier/qmqtt/src/mqtt'
g++ -Wl,-s -shared -Wl,-subsystem,windows -Wl,--out-implib,E:\Xavier\qmqtt\lib\libQt5Mqtt.a -o ..\..\lib\Qt5Mqtt.dll object_script.Qt5Mqtt.Release  -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.6.11-win32\lib -LC:\Utils\postgresql\pgsql\lib -LE:\Xavier\Qt\5.11.2\mingw53_32\lib E:\Xavier\Qt\5.11.2\mingw53_32\lib\libQt5Network.a E:\Xavier\Qt\5.11.2\mingw53_32\lib\libQt5Core.a .obj\release\Qt5Mqtt_resource_res.o
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x2ba): undefined reference to `__imp__ZeqRK7QStringS1_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x2d8): undefined reference to `__imp__ZN7QStringaSERKS_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x323): undefined reference to `__imp__ZN10QArrayData10deallocateEPS_yy'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x38d): undefined reference to `__imp__ZeqRK7QStringS1_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x3a8): undefined reference to `__imp__ZN7QStringaSERKS_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x3f3): undefined reference to `__imp__ZN10QArrayData10deallocateEPS_yy'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x4fd): undefined reference to `__imp__ZeqRK7QStringS1_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x518): undefined reference to `__imp__ZN7QStringaSERKS_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x563): undefined reference to `__imp__ZN10QArrayData10deallocateEPS_yy'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x59d): undefined reference to `__imp__ZeqRK7QStringS1_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x5b8): undefined reference to `__imp__ZN7QStringaSERKS_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x603): undefined reference to `__imp__ZN10QArrayData10deallocateEPS_yy'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x66d): undefined reference to `__imp__ZeqRK7QStringS1_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x688): undefined reference to `__imp__ZN7QStringaSERKS_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x6d3): undefined reference to `__imp__ZN10QArrayData10deallocateEPS_yy'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x751): undefined reference to `__imp__ZN10QByteArrayaSERKS_'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x7ad): undefined reference to `__imp__ZN10QArrayData10deallocateEPS_yy'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x865): undefined reference to `__imp__ZN14QObjectPrivateC2Ei'
./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x86c): undefined reference to `__imp__ZN10QArrayData11shared_nullE'./.obj\release\qmqttclient.o:qmqttclient.cpp:(.text+0x906): undefined reference to `__imp__ZN5QUuid10createUuidEv'

Can anyone help me in getting this resolved? And I am wondering why by default the library is not available?

来源:https://stackoverflow.com/questions/53624425/qts-qmqtt-comiplation-issues-on-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!