Static linking vs dynamic linking

后端 未结 17 2013
半阙折子戏
半阙折子戏 2020-11-22 07:40

Are there any compelling performance reasons to choose static linking over dynamic linking or vice versa in certain situations? I\'ve heard or read the following, but I don\

17条回答
  •  悲&欢浪女
    2020-11-22 08:05

    Another issue not yet discussed is fixing bugs in the library.

    With static linking, you not only have to rebuild the library, but will have to relink and redestribute the executable. If the library is just used in one executable, this may not be an issue. But the more executables that need to be relinked and redistributed, the bigger the pain is.

    With dynamic linking, you just rebuild and redistribute the dynamic library and you are done.

提交回复
热议问题