开发者

What is static library and what is dynamic library, what is the difference and what is better to use and why? [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

What do 'statically linked' and 'dynamically linked' mean?

I know here lot of similiar questions (for instance first or second or third one) But in no one I found full answer of my question. Please expl开发者_运维技巧ain me the main differences and when I have to use which type of library?


A static library is meant to be combined with your code into a single executable file by a linker.

A dynamic library is meant to be loaded by the operating system after the main executable has been loaded, and the linking of the symbol addresses will be done by the OS at that time. This may be done automatically based on dependency information in the executable, or it may be done explicitly by the program. This is called "dynamic linking" because the library may change at any point before the OS has loaded it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜