使用CYGWIN的gcc编译hello world

 时间:2026-02-15 11:10:08

1、打开CYGWIN软件。

使用CYGWIN的gcc编译hello world

2、输入vim命令,进入文本编辑界面

使用CYGWIN的gcc编译hello world

3、按键盘上的i键,进去编辑状态。

使用CYGWIN的gcc编译hello world

4、编写hello world程序

#include<stdio.h>

int main(void)

{

        printf("hello world");

}

使用CYGWIN的gcc编译hello world

5、编写完成后,按Esc键后,再按:键,然后输入save hello.c,进行保存你编写的程序。

使用CYGWIN的gcc编译hello world

6、再按一下:键,输入quit退出编辑文本状态。

使用CYGWIN的gcc编译hello world

7、然后输入gcc hello.c -o hello,回车

使用CYGWIN的gcc编译hello world

8、输入ls显示文件,你会看到文件下面多了一个hello.exe,这就是编译后的结果。

使用CYGWIN的gcc编译hello world

9、输入./hello,执行编写好的程序。

使用CYGWIN的gcc编译hello world

  • 英雄联盟LOL雪人骑士努努无限乱斗暴力玩法出装
  • 怎样种大蒜产量高
  • 印度来那度胺新包装?2019来那度胺最新包装!
  • 漫威超级战争怎么获得英雄格鲁特
  • 老酒焖黄鱼的做法
  • 热门搜索
    美不胜收的意思 作用英文 有什么好玩的网页游戏 野餐带什么吃的 燕窝功效与作用 crossover什么意思 存量房是什么意思 海藻酸钠的作用 回眸一笑什么意思 什么都没有穿的美女