QT6.11社区版+OPC UA控件之环境搭建

张开发
2026/4/16 9:24:00 15 分钟阅读

分享文章

QT6.11社区版+OPC UA控件之环境搭建
QT社区版OPC UA控件之环境搭建前提先安装好QT Creator一、使用qt自带的mingw进行git clone拉取qtopcua二、进入目录并且切换版本三、创建build且进入四、cmake五、然后mingw32-make六、然后mingw32-make install七、按照官方手册进行使用1.Building with CMake2.Building with qmake前提先安装好QT Creator一、使用qt自带的mingw进行git clone拉取qtopcuagit clone https://code.qt.io/qt/qtopcua.git二、进入目录并且切换版本cd qtopcua git checkout6.11.0目前qt自带的版本为三、创建build且进入mkdir build cd build四、cmakecmake-GMinGW Makefiles-DCMAKE_INSTALL_PREFIXC:\Qttools\6.11.0\mingw_64..五、然后mingw32-makemingw32-make六、然后mingw32-make installmingw32-make install七、按照官方手册进行使用1.Building with CMakeUse the find_package() command to locate the needed module components in the Qt6 package:find_package(Qt6 REQUIRED COMPONENTS OpcUa)target_link_libraries(mytarget Qt::OpcUa)2.Building with qmakeTo configure the module for building with qmake, add the module as a value of the QT variable in the project’s .pro file:QTopcua

更多文章