当前位置:网站首页>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
边栏推荐
- Qt读写XML文件(含源码+注释)
- Data stream encryption and decryption of C
- Rust: shared variable in thread pool
- Yolov4 pruning [with code]
- 【ACM】376. Swing sequence
- 读取excel,int 数字时间转时间
- What are the relationships and differences between threads and processes
- Jenkspy package installation
- Queue solving Joseph problem
- QT reading and writing XML files (including source code + comments)
猜你喜欢
powerdesigner各种字体设置;preview字体设置;sql字体设置
Calculation of fishing net road density
硬核解析Promise對象(這七個必會的常用API和七個關鍵問題你都了解嗎?)
Multifunctional toolbox wechat applet source code
解决报错max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
SSD硬盘SATA接口和M.2接口区别(详细)总结
ArcGIS license error -15 solution
C network related operations
Robocode tutorial 8 - advanced robot
Random number generation of C #
随机推荐
word frequency count
【ACM】509. Fibonacci number (DP Trilogy)
Cells in rust share variable pointers
Resolves the interface method that allows annotation requests to be written in postman
Crawler for querying nicknames and avatars based on qqwebapi
Qt读写XML文件(含源码+注释)
MATLAB从入门到精通(二)
串口调试工具cutecom和minicom
Using transmittablethreadlocal to realize parameter cross thread transmission
Docker 安装 MySQL
[UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (2)
Selenium + phantom JS crack sliding verification 2
Dock installation redis
Nanotechnology + AI enabled proteomics | Luomi life technology completed nearly ten million US dollars of financing
【ACM】376. 摆动序列
Realization of consumer gray scale
logstash 7. There is a time problem in X. the difference between @ timestamp and local time is 8 hours
C network related operations
Install pyshp Library
WIN1 remote "this may be due to credssp encryption Oracle correction" solution