分享

install gcc for cygwin

 王少斌 2012-09-30

Step 0: Download and run the cygwin installer.

 

Step 1: Select “Install from Internet”:

 

Step 2: Install to default location:

 

Step 3: Use default local package directory (click next)

Step 4: Use whatever internet connection settings (click next)

Step 5: Select a mirror (click next)

Step 6 (a): In the “Select Packages” expand “Devel”:

 

 

Step 6 (b): Select gcc, gdb, and make:

 

 

Step 7: click next and follow the rest of the installation instructions.

 

Clicking on the “cygwin” icon placed upon your desktop gets you to a “bash” shell (see below) with the current working directory of C:\cygwin\home\<username>.  Assuming you have placed a C program in this directory in a file called “main.c” you can use gcc as shown below (you can create “main.c” using “notepad.exe” which ensures it is a pure text file—wordpad.exe may save your code in “rich text” which gcc will not understand).

 


    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多