📜  本机编译器和交叉编译器的区别

📅  最后修改于: 2021-09-11 04:18:36             🧑  作者: Mango

1. 本地编译器:
本机编译器是为其运行的同一平台生成代码的编译器。它将高级语言转换为计算机的母语。例如 Turbo C 或 GCC 编译器

2. 交叉编译器:
交叉编译器是一种为运行编译器的平台以外的平台生成可执行代码的编译器。例如,在 Linux/x86 机器上运行的编译器正在构建一个将在单独的 Arduino/ARM 上运行的程序。

本地编译器和交叉编译器的区别:

Native Compiler Cross Compiler
Translates program for same hardware/platform/machine on it is running. Translates program for different hardware/platform/machine other than the platform which it is running.
It is used to build programs for same system/machine & OS it is installed. It is used to build programs for other system/machine like AVR/ARM.
It is dependent on System/machine and OS It is independent of System/machine and OS
It can generate executable file like .exe It can generate raw code .hex
TurboC or GCC is native Compiler. Keil is a cross compiler.