当前位置:网站首页>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
边栏推荐
- Excel opens large CSV format data
- re正则表达式
- 14个py小游戏源代码分享第二弹
- Log4j2 cross thread print traceid
- Selenium + webdriver + chrome realize Baidu to search for pictures
- MATLAB从入门到精通(二)
- 硬核解析Promise對象(這七個必會的常用API和七個關鍵問題你都了解嗎?)
- Correct opening method of option
- Closure type of rust (difference between FN, fnmut and fnone)
- JD-FreeFuck 京東薅羊毛控制面板 後臺命令執行漏洞
猜你喜欢

Qtablewidget usage explanation

MySQL auto start settings start with systemctl start mysqld

idea中安装YapiUpload 插件将api接口上传到yapi文档上

Robocode tutorial 3 - Robo machine analysis

STM32学习记录0008——GPIO那些事1

Robocode Tutorial 4 - robocode's game physics

re正則錶達式

【ACM】376. 摆动序列

How to install jsonpath package

powerdesigner各种字体设置;preview字体设置;sql字体设置
随机推荐
Dock installation redis
Qt读写XML文件(含源码+注释)
Yolov4 pruning [with code]
解决允许在postman中写入注释请求接口方法
Gson fastjason Jackson of object to JSON difference modifies the field name
Analysez l'objet promise avec le noyau dur (Connaissez - vous les sept API communes obligatoires et les sept questions clés?)
Serial port debugging tools cutecom and minicom
Gobang game based on pyGame Library
Basic usage of crawler requests
mysql自动启动设置用Systemctl start mysqld启动
xlsxwriter. exceptions. Filecreateerror: [errno 13] permission denied
JD-FreeFuck 京东薅羊毛控制面板 后台命令执行漏洞
[UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (1)
Rust: the output information of println is displayed during the unit test
C [file operation] read TXT text by line
Rewrite four functions such as StrCmp in C language
Feign requests the log to be printed uniformly
解决报错max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
Qtablewidget usage explanation
Docker installation MySQL