Going straight to the point, DLLs are widely used, but sometimes (often) when you need to build a dynamic library, you will encounter the need to call a dynamic library made by others, so today I will briefly talk about the nested calling of DLLs.
First, get 2 simple DLLs and
set them as empty projects, then add a header file and a source file.
It should be no problem to compile these two projects independently to generate a DLL. Then, let’s get another DLL. This DLL will Call the previous two DLLs.
Or choose an empty project, and then add a header file and source file:
Then set the directory of the project. Since several projects are in one solution, the generated DLL files are all under the Debug directory by default. Set the directory After that, generating the DLl should not be a problem.
At the end, make another project, call the DLL of the following DllCombine project, or an empty project, directly include the header file of DllCombine in the source file, set the include directory and library directory of the project, and you can use it.
Source code: https://download.csdn.net/download/griffin041702/35096612
C/C++ dynamic library nested call
Guess you like
Origin blog.csdn.net/griffin041702/article/details/121009686
Recommended
Ranking