当前位置: 首页 > news >正文

企业网站方案设计专业竞价托管哪家好

企业网站方案设计,专业竞价托管哪家好,南通优普网站建设优化,wordpress导航大全文章目录 [toc]1、概述2、下载QtMqtt源码3、编译4、验证5、参考6、视频 更多精彩内容👉内容导航 👈👉Qt网络编程 👈 1、概述 Qt默认是不包含mqtt库的,如果需要使用到mqtt库就只能自己编译配置; 网络所有的…

文章目录

    • @[toc]
    • 1、概述
    • 2、下载QtMqtt源码
    • 3、编译
    • 4、验证
    • 5、参考
    • 6、视频

更多精彩内容
👉内容导航 👈
👉Qt网络编程 👈

1、概述

  • Qt默认是不包含mqtt库的,如果需要使用到mqtt库就只能自己编译配置;

  • 网络所有的QtMqtt配置的文章都是编译完成手动复制,非常麻烦,对新手也非常不友好吗,容易漏了一些步骤;

  • 本文中主要说明如何自动编译配置QtMqtt,无需手动拷贝、生成帮助手册
    注意: 编译前需要安装sudo apt install perl,如果没有perl则编译后生成的头文件都是带.h后缀的。

演示环境:

环境版本
相同ubuntu22.04
Qt5.14.2
QtMqtt5.14.2

2、下载QtMqtt源码

  • 命令行下载:下载完成后选择QtMqtt版本,与Qt版本相同或者相近;
git clone https://github.com/qt/qtmqtt.git
git clone http://code.qt.io/qt/qtmqtt.git
git clone https://code.qt.io/qt/qtmqtt.gitgit tag   # 查看分支
git checkout 5.14.2  # 切换分支
  • 浏览器下载:

在这里插入图片描述

3、编译

  • 使用qtcreator打开qtmqtt.pro(qtcreator如果不是使用sudo权限运行,则下面的2、3步需要自己打开终端运行命令行)
  • 添加编译配置;
    • 选择【项目】【构建】【添加构建步骤】【make】;
    • 第一个:在make参数项添加docs,用于生成帮助手册;
    • 第二个:在make参数项添加install_docs,用于自动安装帮助手册;(需要管理员权限)
    • 第三个:在make参数项添加install,用于自动安装编译好的qtmqtt;(需要管理员权限)

在这里插入图片描述

在这里插入图片描述

  • 编译报错:是因为使用make install_docs安装没有权限
19:57:10: 正在启动 "/usr/bin/make" install_docs -j16cd src/ && ( test -e Makefile || /opt/Qt5.14.2/5.14.2/gcc_64/bin/qmake -o Makefile /home/mhf/qtmqtt/src/src.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile install_docs
make[1]: Entering directory '/home/mhf/qtmqtt/build/gcc64-Debug/src'
cd mqtt/ && ( test -e Makefile || /opt/Qt5.14.2/5.14.2/gcc_64/bin/qmake -o Makefile /home/mhf/qtmqtt/src/mqtt/mqtt.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile install_docs
make[2]: Entering directory '/home/mhf/qtmqtt/build/gcc64-Debug/src/mqtt'
/opt/Qt5.14.2/5.14.2/gcc_64/bin/qmake -install qinstall /home/mhf/qtmqtt/build/gcc64-Debug/doc/qtmqtt /opt/Qt5.14.2/Docs/Qt-5.14.2/qtmqtt
/opt/Qt5.14.2/5.14.2/gcc_64/bin/qmake -install qinstall /home/mhf/qtmqtt/build/gcc64-Debug/doc/qtmqtt.qch /opt/Qt5.14.2/Docs/Qt-5.14.2/qtmqtt.qch
Error copying /home/mhf/qtmqtt/build/gcc64-Debug/doc/qtmqtt.qch to /opt/Qt5.14.2/Docs/Qt-5.14.2/qtmqtt.qch: Destination file exists
Error copying /home/mhf/qtmqtt/build/gcc64-Debug/doc/qtmqtt/examples-manifest.xml to /opt/Qt5.14.2/Docs/Qt-5.14.2/qtmqtt/examples-manifest.xml: Destination file exists
make[2]: *** [Makefile:2947: install_inst_qch_docs] Error 3
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/mhf/qtmqtt/build/gcc64-Debug/src/mqtt'
make[2]: *** [Makefile:2938: install_inst_html_docs] Error 3
make[1]: Leaving directory '/home/mhf/qtmqtt/build/gcc64-Debug/src'
make[1]: *** [Makefile:540: sub-mqtt-install_docs] Error 2
make: *** [Makefile:597: sub-src-install_docs] Error 2
19:57:11: 进程"/usr/bin/make"退出,退出代码 2 。
Error while building/deploying project qtmqtt (kit: gcc64)
When executing step "Make"
  • 打开终端,进入编译路径下,再使用sudo make installsudo make install_docs进行安装。

在这里插入图片描述

4、验证

  • 将qtmqtt\examples\mqtt路径下的示例工程复制 出来,使用qtcreator打开进行编译。
  • 如果不复制到qtmqtt工程外,可能无法编译。

在这里插入图片描述

  • 编译成功后如下所示:

在这里插入图片描述

  • 使用qtmqtt只需要在pro文件中添加QT += mqtt就可以引入。

在这里插入图片描述

5、参考

  • qt/qtmqtt.git - Qt Module to implement MQTT protocol version 3.1 and 3.1.1 http://mqtt.org/
  • GitHub - qt/qtmqtt: Qt Module to implement MQTT protocol version 3.1 and 3.1.1 http://mqtt.org/

6、视频

linux下qt5全自动编译配置qtmqtt



http://www.yidumall.com/news/78904.html

相关文章:

  • 棋牌游戏网站开发网络营销推广外包服务
  • wordpress 支付宝付款咸阳seo
  • 公司域名注册网站哪个好开发客户的70个渠道
  • 中山快速做网站公司百度官方网页版
  • 网站制作乌鲁木齐线上销售平台有哪些
  • 个人可以架设网站吗微信公众号小程序怎么做
  • 网站建设意见网络营销的推广方法有哪些
  • 100t空间 做网站谷歌的推广是怎么样的推广
  • 做网站公司平台接app推广
  • 景山网站建设公司专业网站建设
  • 商城版网站制作b2b免费推广平台
  • 做网站技术服务费属于什么科目昆明网络推广公司排名
  • 移动免费网站建设厦门网站建设平台
  • 大连网站优化可以发外链的论坛有哪些
  • 做推广适合哪些网站qq群引流推广软件
  • 注册公司注册资金最低多少钱杭州seo
  • 接做网站私活b站在线观看
  • 广西建设工会网站网络运营推广是做什么的
  • 想学做网站可以在哪学免费seo在线优化
  • 郑州做网站公今日特大新闻新事
  • 微信开发平台官网小小课堂seo自学网
  • 昆山自适应网站建设杭州关键词排名工具
  • 一手房发帖网站怎样做今日国际军事新闻头条
  • 无锡企业建站模板企业网络推广计划
  • wordpress 首页 缩略图苏州seo网站优化软件
  • 杭州网站制作培训运营seo是什么意思
  • 直播网站开发费用广州网站seo公司
  • wap新闻网站源码西安seo计费管理
  • 网站优化排名资源山西搜索引擎优化
  • 公司网站建设佛山哪家打开百度一下你就知道