使用Linux系统自带的gcc编译工具
1、编写helloworld的c程序
#include<stdio.h>
void main()
{
printf("Hello World!\n");
return;
}
2、使用gcc编译成可执行文件
[root@localhost ~]# gcc test.c -o test
3、执行
[root@localhost ~]# ./test
Hello World!
使用Linux系统自带的gcc编译工具
1、编写helloworld的c程序
#include<stdio.h>
void main()
{
printf("Hello World!\n");
return;
}
2、使用gcc编译成可执行文件
[root@localhost ~]# gcc test.c -o test
3、执行
[root@localhost ~]# ./test
Hello World!