makefile 中的 CC 和 LD 代表什么?
在 makefile 中,CC(编译器)和 LD(链接器)代表什么?
CC中的C大概是编译器,其他的C是什么? LD中的L可能是链接器,D代表什么?
In makefiles what do CC (compiler) and LD (linker) stand for?
C in CC is probably compiler, what is the other C?
And L in LD is probably linker, what does the D stand for?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这些变量的名称来源于相应工具的名称。通常这些缩写的含义如下:
CC
代表“C c编译器”(在 GCC 缩写中也被视为“<编译器c集合”)。LD
是一个链接器(来自“link editor”或“loa呃”)。这些也常用于 makefile(请参阅隐式变量章节 GNU Make 手册):
CPP
代表“C prep处理器”CXX< /代码> 是一个C++编译器
AS
是一个assembly语言编译器AR
是一个archive-维护程序Names of these variables originate from names of the corresponding tools. Usually the meaning of these abbreviations is the following:
CC
stands for "C compiler" (in GCC abbreviation it is also treated as "compiler collection").LD
is a linker (comes from "link editor" or from "loader").These are also commonly used in makefiles (see Implicit variables chapter of GNU Make manual):
CPP
stands for "C preprocessor"CXX
is a C++ compilerAS
is an assembly language compilerAR
is an archive-maintaining programCC 是“C 编译器”。 LD 是“链接编辑器”。 LE 在 shell 中已经被用来表示“小于或等于”,可能是 sh。因此,按照惯例,冲突的字符在缩写词中向前移动了一个字符。因此 LD 和 DYLD。
CC is "C Compiler". LD is "Link Editor". LE was already used to mean "less or equal" in a shell, likely sh. So, per convention, the conflicting character was moved one character forward in the word being abbreviated. Hence LD and DYLD.
$(CC)
是 C 编译器(或编译器集合),$(LD)
是链接器,正如您所怀疑的那样。我相信 D 代表“动态”。$(CC)
is the C compiler (or compiler collection),$(LD)
is the linker, as you suspected. The D stands for "Dynamic", I believe.