unix中静态库和动态库的区别 [英] difference between static and dynamic library in unix

查看:27
本文介绍了unix中静态库和动态库的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

unix 中的静态库和动态库有什么区别?我如何在 unix 中使用库?

what is the difference between static and dynamic library in unix? how can i use libraries in unix?

推荐答案

静态库在链接时链接到您的可执行文件中,因此在那个时候被修复.

Static libraries are linked into your executable at link time so are fixed at that point.

对于动态链接,在链接时只链接到库的引用.当您运行程序时,动态库(实际代码)在加载时链接到您的可执行文件.

For dynamic linking, only a reference to the library is linked in at link time. The dynamic library (the actual code) is linked to your executable at load time, when you run your program.

这意味着您可以随时更改动态库,下次加载程序时将使用新库.

That means you can change the dynamic library at any time and you'll use the new one the next time you load the program.

请参阅此处了解更多详情.

这篇关于unix中静态库和动态库的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆