将高级语言转换为低级语言。
clang: 1,预处理(preprocessing) 2,编译(complition) 3,组装(assembled)4,连接(link)
1,预处理:clang –E hello.c
例如,#include <stdio.h>
#define NAME “Rob”
预处理会将所需要的文件(如,stdio.h)复制粘贴在开头
2,编译:clang –S hello.s
将c语言编译为汇编语言,对应机器所用的处理器,有x86处理器汇编代码。
3,组装:clang –c hello.s
将汇编语言转换成机器码
4,连接:
vi hello.c
clang –c hello.c
clang hello.o hello2.o hello3.o hello4.o
2,function
main函数 返回 0位正常返回任何非零为错误。
int main(void)
3,style:Comments,Formatting,Variable names
原文:http://www.cnblogs.com/IDRI/p/4892819.html