当前位置:网站首页>qt下开发mqtt的访问程序
qt下开发mqtt的访问程序
2022-07-04 03:53:00 【linchao100】
1、要下载mqtt模块
下载地址:https://github.com/emqx/qmqtt,注意要下载qmqtt-master版本的,不要下载qtmqtt-dev
下载符合你的qt版本,否则要接近的版本,还要改里面的编译版本号,我是通过查找替换修改的。
2、编译安装qtmqtt模块
具体要把头文件拷贝到qt开发环境的include目录
用qt打开下载的pro文件
编译通过ok
把里面的prj、库、拷贝到相应的地方
3、可以试试里面例子是否能够编译
我编译了simpleclient.pro
出现错误分别是:
a、qtmqtt模块没有安装好,把prj两个文件拷贝到gcc64下,模块找到了;
b、头文件没有找到,头文件要用"QtMqtt/qmqttclient.h"
c、改程序,因为我的broker是要输入user和password
最后、程序跑的很好

边栏推荐
猜你喜欢

Architecture practice camp - graduation project of module 9 of phase 6

Kivy教程之 更改背景颜色(教程含源码)

什么是上下文?

Keysight N9320B射频频谱分析仪解决轮胎压力监测方案

仿《游戏鸟》源码 手游发号评测开服开测合集专区游戏下载网站模板

Imitation of "game bird" source code, mobile game issue evaluation, open service, open test collection, game download website template

Architecture training graduation design + summary

5张图告诉你:同样是职场人,差距怎么这么大?

Leetcode skimming: binary tree 04 (sequence traversal of binary tree)

RHCSA 04 - 进程管理
随机推荐
【微信小程序】好看的轮播图组件
Rhcsa 06 - suid, sgid, sticky bit (to be added)
6-5漏洞利用-SSH弱口令破解利用
Rhcsa 01 - create partitions and file systems
Formatted text of Kivy tutorial (tutorial includes source code)
分布式CAP理论
微信脑力比拼答题小程序_支持流量主带最新题库文件
Touch and take you to implement an EventEmitter
Leetcode skimming: binary tree 09 (minimum depth of binary tree)
Distributed cap theory
最长递增子序列问题(你真的会了吗)
Deep parsing structured exception handling (SEH) - by Matt Pietrek
I.MX6U-ALPHA开发板(C语言版本LED驱动实验)
Balloon punching and Boolean operation problems (extremely difficult)
Architecture practice camp - graduation project of module 9 of phase 6
Main applications of TDK lambda power supply
Redis:有序集合zset类型数据操作命令
浅谈JVM的那些事
NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
ModStartBlog 现代化个人博客系统 v5.2.0 源码下载