Static library - the difference with the use of dynamic libraries

The advantages and disadvantages
after the clear difference between the two points, the advantages and disadvantages of both naturally can be divided out.

                                       Advantages Disadvantages

A static library that less dependency executable files, has been packed into an executable file of the executable file becomes large
            2, complete link compilation phase, during execution of the code loaded faster 2, as if the other dependent libraries library, will result in extra copies, because the file must be packaged with the target
                                                                                                                                            3, the upgrade is not convenient, upgrade must be recompiled
                                                                                                                                             
DLL 1, dynamic libraries can share resources between processes, there is a 1 on the line, the load during operation, the will slow down code execution speed
            2, the upgrade process is simple, no need to recompile 2, increasing dependency program, must follow along with the executable

file form
                 Windows Linux
static library .lib libxxx.a
Dynamic libraries .dll and .lib libxxx.so

Reference link: https: //www.jianshu.com/p/7175cc69b10a

                 https://blog.csdn.net/a369189453/article/details/81124685

                 https://www.jb51.net/article/43743.htm

Guess you like

Origin www.cnblogs.com/chua052/p/11431624.html