当前位置:网站首页>Creation and use of QT dynamic link library
Creation and use of QT dynamic link library
2022-04-23 18:15:00 【Talent、me】
Purpose
Compiling the source file into a dynamic library is to compile the source code .cpp While keeping the code confidential ,
Subdivide each function into modules , It is convenient for later sorting and other people to call directly .
stay Qt Creator Create a dynamically linked library project
Steps are as follows :
Let's focus on , If you want to put the source code .cpp Sub assemble into dynamic library , And the source code uses Qt Related libraries , For example, a custom encapsulated Messagebox Dialog interface , Then you need to choose Widgets perhaps Core.
Always choose the next step , Then determine ,Qt Creator The following project will be generated .
For verification purposes , I only wrote a member function void test();
Then click compile... In the lower left corner , This pop-up window will pop up , This pop-up window can be ignored .
Then the compiled dynamic library will appear in the compiled target path .
To this step , Create success .
Using dynamic libraries
stay Qt In the project xxx.pro Add header file path and library file path to the file
INCLUDEPATH +=./
LIBS += -L/home/hy/Demo/testlibso/lib -lmyLibDemo
Then add two header files about the dynamic library in the project
You can successfully use the dynamic library .
版权声明
本文为[Talent、me]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210610471456.html
边栏推荐
- Error reported when running tensorboard: valueerror: duplicate plugins for name projector, solution
- 深度学习经典网络解析目标检测篇(一):R-CNN
- Hard core parsing promise object (do you know these seven common APIs and seven key questions?)
- Permission management with binary
- Qtablewidget usage explanation
- String function in MySQL
- [UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (2)
- SSD硬盘SATA接口和M.2接口区别(详细)总结
- Cutting permission of logrotate file
- Flash - Middleware
猜你喜欢
Data stream encryption and decryption of C
Visualization of residential house prices
Docker 安裝 Redis
MATLAB从入门到精通(二)
GDAL + ogr learning
Resolve the error Max virtual memory areas VM max_ map_ count [65530] is too low, increase to at least [262144]
Scikit learn sklearn 0.18 official document Chinese version
SSD硬盘SATA接口和M.2接口区别(详细)总结
Calculation of fishing net road density
Process management command
随机推荐
Stanford machine learning course summary
Re regular expression
The difference between deep copy and shallow copy
【ACM】509. 斐波那契数(dp五部曲)
C medium? This form of
Jeecg boot microservice architecture
.104History
Mysql database backup command -- mysqldump
【ACM】455. 分发饼干(1. 大饼干优先喂给大胃口;2. 遍历两个数组可以只用一个for循环(用下标索引--来遍历另一个数组))
Reptile efficiency improvement method
由tcl脚本生成板子对应的vivado工程
Robocode tutorial 5 - enemy class
Excel opens large CSV format data
【ACM】376. Swing sequence
logstash 7. There is a time problem in X. the difference between @ timestamp and local time is 8 hours
Yolov4 pruning [with code]
Resolves the interface method that allows annotation requests to be written in postman
Rust: how to match a string?
RC smart pointer in rust
Process management command