码迷,mamicode.com
首页 > Windows程序 > 详细

install g++ on windows

时间:2015-12-24 23:49:41      阅读:576      评论:0      收藏:0      [点我收藏+]

标签:

install c++/g++ on windows

 
 

install c++/g++ on windows

1. 算是提示吧:

Pick the drive and a folder in which you want to install g++. I’ll assume that it is C:, but you can choose a different one. If you choose a different drive or a different folder, you’ll need to adapt the directions below accordingly.

2 下载 full.exe

这个文件的安全性不懂,反正下载了安装后就有一些在Linux常看到的指令的.exe文件比如ls mv … (这个让我意外收获了,我是一个喜欢在Linux下码的boy)下载完后点击安装。
技术分享

3 添加环境变量

Start -> Control Panel -> System -> Advanced -> Environment Variables双击PATH编辑,以;作为分隔添加环境变量的路径:C:\cygnus\cygwin-b20\H-i586-cygwin32\bin这个路径应该都是一样的。注意不要使用pwd命令然后复制路径,斜杠会成这样的/cygnus/cygwin-b...因为在哪个文件路径下有pwd.exe这个程序。被坑了

4 重启

g++ -g hello.cpp -o hello -lm这个命令就可以用了
and 一些实用的Linux命令
warmingA Cygnus Solutions entry will appear in your Programs menu, and an icon may appear on your desktop. Don’t use them!

If you’d like to learn more about where this free compiler came from, we downloaded it from an older site of http://sourceware.org/cygwin/

 

install g++ on windows

标签:

原文地址:http://www.cnblogs.com/ediszhao/p/5074591.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!