1、在Ubuntu中搭建C语言的编辑环境
1、安装Ubuntu虚拟机
2、安装vim(编辑器),gcc(编译器)和build-essential(编译程序必须软件包的列表信息)
sudo apt
sudo apt-get install vim
sudo apt-get install gcc
sudo apt-get install build-essential
3、编写hello world.c
1 #include<stdio.h>
2 int main()
3 {
4 printf("hello world\n");
5 return 0;
6 }
4、编译:
1 gcc helloworld.c -o hello
5、运行:
1 ./hello
PS: gcc helloworld.c -- > helloworld.out