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

前提,先安装好QT Creator

一、使用qt自带的mingw进行git clone拉取qtopcua

git clone https://code.qt.io/qt/qtopcua.git

在这里插入图片描述

在这里插入图片描述

二、进入目录并且切换版本

cd qtopcua
git checkout 6.11.0

目前qt自带的版本为
在这里插入图片描述
在这里插入图片描述

三、创建build且进入

mkdir build
cd build

四、cmake

cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Qttools\6.11.0\mingw_64 ..

在这里插入图片描述

五、然后mingw32-make

mingw32-make

在这里插入图片描述
在这里插入图片描述

六、然后mingw32-make install

mingw32-make install

在这里插入图片描述在这里插入图片描述

七、按照官方手册,进行使用

1.Building with CMake

Use 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 qmake

To configure the module for building with qmake, add the module as a value of the QT variable in the project’s .pro file:

QT += opcua
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值