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

📅  最后修改于: 2021-06-28 07:16:01             🧑  作者: 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.