一、编译器 VS 解释器
在谈iOS链接器之前,先理解两个概念
编译器:
摘自 Wiki Compiler 一段
A compiler is a computer program (or a set of programs) that
transforms source code written in a programming language (the source
language) into another computer language (the target language), with
the latter often having a binary form known as object code. The most
common reason for converting source code is to create an executable
program.
编译器是一种计算机程序,负责把一种编程语言编写的源码转换成另外一种计算机代码,后者往往是以二进制的形式被称为目标代码(object code)。这个转换的过程通常的目的是生成可执行的程序。
编译器的产出是「另外一种代码」,然后这些代码等着被别人拿来执行,如果还不能直接被执行,那么还需要再编译或解释一遍,再交由计算机硬件执行。
编译器,往往是在「执行」之前完成,产出是一种可执行或需要再编译或者解释的「代码」。
特点: 效率比较快,用户体验更加好,缺点是调试周期比较长,每次调试都需要重新编译
解释器:
摘自 Wiki Interpreter 一段
In computer science, an interp