今天,打算学习一下LINUX的软件安装方式,揪出一个曾经没完成的作为学习任务:安装SDL的库。到官网下载软件包的时候,看到一个 Run Time Library,当时很奇怪,这是什么东西? 凭感觉,我想,这会不会就是 动态库?
没把握,于是百度了一下,发现网上没多少介绍,来来去去就是哪一篇,而且居然把它翻译成 运行时库 当时觉得很奇怪,看了一下那篇文章。
那篇文章居然对这个 运行时库 分类为 动态 和 静态 的,当时心想,看来真的理解错了,但是这个玩意到底是什么?还是不太懂。
于是看看英文的,直接就看WIKI。 结果看到这段话,几乎让我肯定,这个什么 Run Time Library其实就是 动态库。
下面这段话是维基里最初的两段,我按我的理解尽量翻译,如有不对之处,还请指出,谢谢!
When the source code of a computer program is translated into the respective target language by a compiler, it would cause an extreme enlargement of program code if each command in the program and every call to a built-in function would cause the in-place generation of the complete respective program code in the target language every time. Instead the compiler often uses compiler-specific auxiliary functions that are mostly not accessible to application programmers and which are implemented in the runtime library. Depending on the compiler manufacturer, the runtime library will sometimes also contain the standard library of the respective compiler or be contained in it. 当一个程序的源代码被编译器转换成特定平台目标语言时,如果程序中的每条指令和每一个内置函数的调用,会引起程序代码的大量增加,(这后半句从句我很难直译,看了好几次,猜测它的意思是说)这些大量额外增加的目标代码会导致在特定目标机器上每次都要运行。 用那些通常不需要向应用程序员开放的特定编译系统的辅助函数取代编译器(的这个功能?),并把这些放在runtime library里。独立于编译器编译,runtime library有时会包含特定编译器的标准库或者说可以把(标准库)变得可获取。
但是看到最后一段的时候,我发现我理解错误了。因为 动态库 明摆着就叫 dynamic library.
The concept of a runtime library should not be confused with an ordinary program library like that created by an application programmer or delivered by a third party or a dynamic library, meaning a program library linked at run time. For example, the programming language C requires only a very minimal runtime library, but defines a large standard library (called C standard library) that each implementation has to deliver.
不过这个东西到底是什么呢?
|