Linux 基础与应用教程 005(GCC实验)

GCC实验
1、安装GCC编译器yum install -y gcc
2、vi hello.c
用vi写“hello world!”的C语言代码vi hello.c
#include "stdio.h"
int main()
{
printf("hello world!\n");
}
3、用GCC将该文件编译为可执行文件hello.run
gcc hello.c -o hello.run
chmod +x hello.run
4、运行hello.run,./hello.run。

 

posted on 2018-04-13 09:46  马文奇  阅读(120)  评论(0编辑  收藏  举报

导航