QT社区版+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

6375

被折叠的 条评论
为什么被折叠?



