QT generate dynamic link library and call the procedure

First, build a dynamic link library

1: New project, select Library C ++ library option, as shown below:

2: Select the Type Library

3: Select the core modules (choose according to their actual decided which modules required)

4: Completing the package interface:

5: Compile and run the following window that illustrate the dynamic link library generation success:

6: In the generated project directory you can see the generated static and dynamic libraries

Second, call the dynamic link library just created in the program

Now we can call just generated dynamic library program inside.

1: Several new directory in the project directory, include directories for storing link library header files, directories store static link library lib, bin directory for dynamic link library; as shown below:

2: In the following a few pro which added:

 

3: the need to use the interface class which calls:

Finally, a warm reminder, remember the ".dll" files in the same directory exe, or can not operate normally Oh! 

 

 

Guess you like

Origin blog.csdn.net/qq_27081181/article/details/91441576