Static libraries: Files in Windows with the suffix. lib, and. a files in Linux;
Dynamic libraries: Files with the suffix. dll in Windows, and. so files in Linux;
In Windows:
Call a static library: Add a static library path-dependent on the static library (or #pragma comment (lib,xx.lib))--Contains header files--and the function in the static library can be called directly from the user program
Invoke Dynamic Library: 1) Static call, implicit invocation: Add library path and header file path-dependent static library option (or #pragma comment (lib,xx.lib))--Contains header file--the function in the dynamic library can be called directly in the user program (Note that it becomes an implicit call to a dynamic library because it is based on a function address in a static library. lib file that is generated while generating the dynamic library.)
2) Dynamic invocation: No action required, just use the Loadlibray_getproaddress_freelibray API directly to manually invoke the API of the dynamic library
The creation and use of static library and dynamic library