TTcdeMacBook-Air:SystemCompiler TTc$ gcc -E hello.c -o hello.i
TTcdeMacBook-Air:SystemCompiler TTc$ open .
TTcdeMacBook-Air:SystemCompiler TTc$ gcc -O hello.c -o hello.o
TTcdeMacBook-Air:SystemCompiler TTc$ ls
hello.c hello.i hello.o hello.s
TTcdeMacBook-Air:SystemCompiler TTc$ open .
TTcdeMacBook-Air:SystemCompiler TTc$ ls
hello.c hello.i hello.o hello.s
TTcdeMacBook-Air:SystemCompiler TTc$ gcc -o hello hello.c
TTcdeMacBook-Air:SystemCompiler TTc$ ls
hello hello.c hello.i hello.o hello.s
TTcdeMacBook-Air:SystemCompiler TTc$ ls
hello hello.c hello.i hello.o hello.s
TTcdeMacBook-Air:SystemCompiler TTc$ ./hello
hello world
TTcdeMacBook-Air:SystemCompiler TTc$ open .
TTcdeMacBook-Air:SystemCompiler TTc$ gcc -O hello.c -o hello.o
TTcdeMacBook-Air:SystemCompiler TTc$ ls
hello.c hello.i hello.o hello.s
TTcdeMacBook-Air:SystemCompiler TTc$ open .
TTcdeMacBook-Air:SystemCompiler TTc$ ls
hello.c hello.i hello.o hello.s
TTcdeMacBook-Air:SystemCompiler TTc$ gcc -o hello hello.c
TTcdeMacBook-Air:SystemCompiler TTc$ ls
hello hello.c hello.i hello.o hello.s
TTcdeMacBook-Air:SystemCompiler TTc$ ls
hello hello.c hello.i hello.o hello.s
TTcdeMacBook-Air:SystemCompiler TTc$ ./hello
hello world
TTcdeMacBook-Air:SystemCompiler TTc$
此时 helllo.c源程序 已经经过 编译系统翻译成了 可执行目标文件 hello (在 win上为 PE文件 在Unix下为 ELF文件)
shell 是一个命令行解释器, 这时候 shell 加载并运行 hello 程序,然后等待程序终止,hello 程序在 显示器上 输出 它的信息,然后终止。 shell 随后输出一个提示符,等待用户 的下一个输入 命令