在Linux下搭建C、C++、Java编程语言的编译环境
1.安装C语言的编译环境
[root@wry ~]# yum install -y gcc
查看
[root@wry ~]# rpm -qa|grep gcc
gcc-4.8.5-44.el7.x86_64
libgcc-4.8.5-44.el7.x86_64
测试编译c语言程序
[root@wry ~]# vi c1.c
[root@wry ~]# cat c1.c
#include<stdio.h>
int main()
{
printf("hello!");
}
[root@wry ~]# gcc c1.c
[root@wry ~]# ls
123.txt a.out myshell2.sh result0.txt yum.repo
anaconda-ks.cfg c1.c myshell.sh wry
[root@wry ~]# ./a.out
hello!
[root@wry ~]#
2.安装C++语言的编译环境
[root@wry ~