在QT6中安装qtmqtt、qtopcua控件的方法

一、将QT6的4个目录回到系统搜索路径中:

qt6-1.png

二、开始安装:
1.编译代码

  1. D:\Qt\Packages\qtmqtt-6.5.0>D:\Qt\6.5.0\mingw_64\bin\qt-configure-module.bat .
  2. D:\Qt\Packages\qtmqtt-6.5.0>cmake –build .

2.安装控件

  1. D:\Qt\Packages\qtmqtt-6.5.0>cmake –install . –verbose

3.安装过程如下:===============================================================

  1. D:\Qt\Packages\qtmqtt-6.5.0>D:\Qt\6.5.0\mingw_64\bin\qt-configure-module.bat .
  2. ‘D:\Qt\6.5.0\mingw_64\bin\\qt-cmake-private.bat’ ‘.’
  3. — The CXX compiler identification is GNU 11.2.0
  4. — The C compiler identification is GNU 11.2.0
  5. — Detecting CXX compiler ABI info
  6. — Detecting CXX compiler ABI info – done
  7. — Check for working CXX compiler: D:/Qt/Tools/mingw1120_64/bin/c++.exe – skipped
  8. — Detecting CXX compile features
  9. — Detecting CXX compile features – done
  10. — Detecting C compiler ABI info
  11. — Detecting C compiler ABI info – done
  12. — Check for working C compiler: D:/Qt/Tools/mingw1120_64/bin/gcc.exe – skipped
  13. — Detecting C compile features
  14. — Detecting C compile features – done
  15. — Performing Test CMAKE_HAVE_LIBC_PTHREAD
  16. — Performing Test CMAKE_HAVE_LIBC_PTHREAD – Success
  17. — Found Threads: TRUE
  18. — Performing Test HAVE_STDATOMIC
  19. — Performing Test HAVE_STDATOMIC – Success
  20. — Found WrapAtomic: TRUE
  21. — Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
  22. — Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
  23.  
  24. — Configuring done
  25. — Generating done
  26. — Build files have been written to: D:/Qt/Packages/qtmqtt-6.5.0
  27.  
  28. D:\Qt\Packages\qtmqtt-6.5.0>cmake –build .
  29. [24/24] Linking CXX shared library bin\Qt6Mqtt.dll
  30.  
  31. D:\Qt\Packages\qtmqtt-6.5.0>cmake –install . –verbose
  32. — Install configuration: "RelWithDebInfo"
  33. — Installing: /Qt/6.5.0/mingw_64/./metatypes/qt6mqtt_relwithdebinfo_metatypes.json
  34. — Installing: /Qt/6.5.0/mingw_64/lib/cmake/Qt6Mqtt/Qt6MqttConfig.cmake
  35. — Installing: /Qt/6.5.0/mingw_64/lib/cmake/Qt6Mqtt/Qt6MqttConfigVersion.cmake
  36. — Installing: /Qt/6.5.0/mingw_64/lib/cmake/Qt6Mqtt/Qt6MqttConfigVersionImpl.cmake
  37. — Installing: /Qt/6.5.0/mingw_64/lib/libQt6Mqtt.a
  38. — Installing: /Qt/6.5.0/mingw_64/bin/Qt6Mqtt.dll
  39. — Installing: /Qt/6.5.0/mingw_64/lib/cmake/Qt6Mqtt/Qt6MqttTargets.cmake
  40. — Installing: /Qt/6.5.0/mingw_64/lib/cmake/Qt6Mqtt/Qt6MqttTargets-relwithdebinfo.cmake
  41. — Installing: /Qt/6.5.0/mingw_64/lib/cmake/Qt6Mqtt/Qt6MqttVersionlessTargets.cmake
  42. — Installing: /Qt/6.5.0/mingw_64/bin/Qt6Mqtt.debug
  43. — Installing: /Qt/6.5.0/mingw_64/./modules/Mqtt.json
  44. — Installing: /Qt/6.5.0/mingw_64/lib/cmake/Qt6Mqtt/Qt6MqttAdditionalTargetInfo.cmake
  45. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt
  46. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttAuthenticationProperties
  47. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttClient
  48. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttConnectionProperties
  49. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttLastWillProperties
  50. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttMessage
  51. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttMessageStatusProperties
  52. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttPublishProperties
  53. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttServerConnectionProperties
  54. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttStringPair
  55. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttSubscription
  56. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttSubscriptionProperties
  57. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttTopicFilter
  58. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttTopicName
  59. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttUnsubscriptionProperties
  60. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QMqttUserProperties
  61. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QtMqtt
  62. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QtMqttVersion
  63. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qtmqttversion.h
  64. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qtmqttexports.h
  65. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqttauthenticationproperties.h
  66. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqttclient.h
  67. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqttconnectionproperties.h
  68. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqttglobal.h
  69. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqttmessage.h
  70. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqttpublishproperties.h
  71. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqttsubscription.h
  72. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqttsubscriptionproperties.h
  73. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqtttopicfilter.h
  74. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqtttopicname.h
  75. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/qmqtttype.h
  76. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/QtMqttDepends
  77. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/6.5.0/QtMqtt/private/qmqttclient_p.h
  78. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/6.5.0/QtMqtt/private/qmqttconnection_p.h
  79. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/6.5.0/QtMqtt/private/qmqttconnectionproperties_p.h
  80. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/6.5.0/QtMqtt/private/qmqttcontrolpacket_p.h
  81. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/6.5.0/QtMqtt/private/qmqttmessage_p.h
  82. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/6.5.0/QtMqtt/private/qmqttpublishproperties_p.h
  83. — Installing: /Qt/6.5.0/mingw_64/include/QtMqtt/6.5.0/QtMqtt/private/qmqttsubscription_p.h
  84. — Installing: /Qt/6.5.0/mingw_64/mkspecs/modules/qt_lib_mqtt.pri
  85. — Installing: /Qt/6.5.0/mingw_64/mkspecs/modules/qt_lib_mqtt_private.pri
  86. — Installing: /Qt/6.5.0/mingw_64/lib/pkgconfig/Qt6Mqtt.pc
  87. — Installing: /Qt/6.5.0/mingw_64/lib/cmake/Qt6Mqtt/Qt6MqttDependencies.cmake
  88. — Installing: /Qt/6.5.0/mingw_64/lib/cmake/Qt6BuildInternals/StandaloneTests/QtMqttTestsConfig.cmake
  89. — Up-to-date: /Qt/6.5.0/mingw_64/lib
  90. — Up-to-date: /Qt/6.5.0/mingw_64/lib/cmake
  91. — Up-to-date: /Qt/6.5.0/mingw_64/lib/cmake/Qt6BuildInternals
  92. — Up-to-date: /Qt/6.5.0/mingw_64/lib/cmake/Qt6BuildInternals/StandaloneTests
  93. — Up-to-date: /Qt/6.5.0/mingw_64/lib/cmake/Qt6Mqtt
  94. — Up-to-date: /Qt/6.5.0/mingw_64/lib/pkgconfig
  95. — Installing: /Qt/6.5.0/mingw_64/lib/Qt6Mqtt.prl
  96.  
  97. D:\Qt\Packages\qtmqtt-6.5.0>

原文作者: BG6RSH | 查看原帖

此条目发表在学习笔记分类目录。将固定链接加入收藏夹。

《在QT6中安装qtmqtt、qtopcua控件的方法》有2条回应

  1. BG6RSH说:

    LINUX下安装:
    1、下载与QT版本对应的OPCUA组件源代码,解压到合适的目录。下载地址 https://github.com/qt/qtopcua/tags
    2、在Ubuntu系统中安装cmake、ninja。

    1. sudo apt install cmake
    2. sudo apt install ninja-build

    3、进入OPCUA源码目录,进入命令行,运行安装程序

    1. ~/Qt/6.5.2/gcc_64/bin/qt-configure-model .
    2. cmake –build .
    3. cmake –install . –verbose
  2. BG6RSH说:

    为QT6+MSVC2022编译器安装组件库:
    1、在QtCreator中打开组件包的cmakelist.txt文件,选择”msvc2019 64bit”编译器;
    2、点击左下角“构建”按钮,编译组件库。
    3、点击系统“开始 -> Qt -> Qt 6.7.2 (MSVC 2019 64-bit)”,进入命令行,运行下面命令:

    1. cd D:\Qt\Packages\qtmqtt-6.7.2\    # 进入组件库源代码目录
    2. cmake –install .\build\Desktop_Qt_6_7_2_MSVC2019_64bit-Release\ –verbose   # 安装组件库

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。