当前位置:网站首页>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
边栏推荐
- Solution to Chinese garbled code after reg file is imported into the registry
- 读取excel,int 数字时间转时间
- Map basemap Library
- Log4j2 cross thread print traceid
- STM32 learning record 0008 - GPIO things 1
- Re regular expression
- Pointers in rust: box, RC, cell, refcell
- Basic usage of crawler requests
- Calculation of fishing net road density
- 【ACM】70. 爬楼梯
猜你喜欢

Cygwin64 right click to add menu, and open cygwin64 here

Spark performance optimization guide

GDAL + ogr learning

Batch export ArcGIS attribute table

Nodejs installation

Robocode Tutorial 4 - robocode's game physics

PowerDesigner various font settings; Preview font setting; SQL font settings

多功能工具箱微信小程序源码

Jeecg boot microservice architecture

Nodejs安装
随机推荐
[UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (1)
Gobang game based on pyGame Library
Re expression régulière
Selenium + phantom JS crack sliding verification 2
.105Location
Linux installs MySQL in RPM (super simple)
Robocode Tutorial 4 - robocode's game physics
Dock installation redis
Flash operates on multiple databases
线上怎么确定期货账户安全的?
Flash - Middleware
Feign requests the log to be printed uniformly
Robocode tutorial 7 - Radar locking
Array rotation
[UDS unified diagnostic service] v. diagnostic application example: Flash bootloader
【ACM】70. climb stairs
Pointers in rust: box, RC, cell, refcell
Selenium + webdriver + chrome realize Baidu to search for pictures
C language to achieve 2048 small game direction merging logic
【ACM】70. 爬楼梯