Ubuntu15.0安装测试gcc(C编译环境)

 时间:2026-02-12 22:37:31

1、打开终端(快捷键Ctrl+Alt+t)输入sudo apt-get install build-essential

Ubuntu15.0安装测试gcc(C编译环境)

2、运行结果如下图,因为我已经配置过了,所以显示的都是0

Ubuntu15.0安装测试gcc(C编译环境)

3、进入到要保存C程序的目录,在终端中输入:gedit hello.c创建并打开hello.c文件

Ubuntu15.0安装测试gcc(C编译环境)

4、在打开的hello.c中输入c程序。保存并关闭

Ubuntu15.0安装测试gcc(C编译环境)

5、输入:sudo gcc hello.c -o hello讲hello.c编译成可执行的hello文件

Ubuntu15.0安装测试gcc(C编译环境)

6、输入:./hello执行hello文件。至此安装配置并测试gcc完成。

Ubuntu15.0安装测试gcc(C编译环境)

  • 电脑开始菜单在哪里
  • eclipse使用教程
  • 电脑资源管理器怎么打开
  • 窗口关闭不了怎么办
  • win10如何安装visualstudio2010旗舰版?
  • 热门搜索
    起床气是什么意思 andy是什么意思 养生堂天然维生素c 防晒衣什么牌子好 什么是低钾血症 什么是夫妻共同财产 号虎食是什么字 炭黑是什么 什么是红茶 割礼什么意思