g++ for windows

时间:2012-10-28 11:46:28
【文件属性】:
文件名称:g++ for windows
文件大小:13.04MB
文件格式:RAR
更新时间:2012-10-28 11:46:28
g++ windows Installing c++/g++ on Windows Disclaimer: This page is being maintained mainly for my students. Use these instructions at your own risk. There is no warranty in any form or shape whatsoever!. There is no guarantee that these instructions are up-to-date. With that understood you may continue with the rest of this page if you choose to accept these terms. This page was last updated on September 13, 2005, but still good as of April 30, 2009. Follow these steps to install g++ (the GNU C++ compiler) for Windows. There is no room for creativity here; you must follow the directions exactly. 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. Download full.exe, an about 14 megabyte executable, to C:\full.exe by right-clicking on the link. Use Save Link As... or Save Target As... Be sure the browser saves the file as C:\full.exe. Run the downloaded executable. This will install g++ (and a lot of other things that you don't really need) on your hard drive. Go to the C: drive using Windows Explorer and double-click on full.exe. Or, open a DOS window (Start > Programs > Command Prompt), connect to the C: drive using the cd command, and type full. Locate where the bin folder was created for the g++ installation. On my Windows XP machine, it was created in the following path: C:\cygnus\cygwin-b20\H-i586-cygwin32\bin You now should add it to the PATH environment variable. You do that by following: Start -> Control Panel -> System -> Advanced -> Environment Variables At this point you can see the PATH variable either in the User Variables or in the System Variables. Add the g++ path into the PATH variable. You add it to the end of the existing value separated by a semicolon (';'). Make sure that you do not lose the original value. You are just appending more to the end separated by a semicolon. Restart your computer. A Cygnus Solutions entry will appear in your Programs menu, and an icon may appear on your desktop. Don't use them! You will use it using the g++ command on a DOS prompt as explained below. You should now be able to run g++ from a DOS (Command Prompt) window. For example, to compile a file called C:\mine\hello.cpp, connect to the C:\mine folder and enter g++ -g hello.cpp -o hello -lm You'll then be able to run the compiled program by entering hello in the DOS window. If you've installed Emacs as described here, you will also be able to run g++ from Emacs. If, when you do this, Emacs tries to compile with the command make -k, you made a mistake during the Emacs installation. If you want to learn how to run g++ on emacs, see here. 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/. If you wish to clean up a little, you may delete the file: full.exe at this point. Your g++ compiler is installed under C:\cygnus.
【文件预览】:
full.exe

网友评论

  • 不太好用 还是给个好评吧
  • 我怎么感觉不值5个积分
  • 非常好用!感谢分享!
  • 用着不太习惯,但编译速度不错
  • 用了一下,不是很习惯。还是谢谢分享
  • 虽然没用上,但还是感谢
  • 试了,挺好用的
  • 可以用,感谢!
  • 很好用 值得学习 谢谢
  • 挺好的资源
  • 不错,十分好用,推介!
  • 安装成功了,但是还是没有用到,不过谢谢了
  • 搞不懂这是什么
  • 已经安装了,但是有警告,不知道怎么用
  • 不好用,可能是我不会用
  • 可以用,感谢!
  • 还不错,但没有linux上的好用
  • 挺好的 已经安装用了
  • 挺好的资源,不过不会用没用起来。多谢!
  • 很强大,现在有新版本了
  • 一个非常好的工具,对于初学者调试程序来说非常的简单方便
  • 6666很好,这文档很好学习用
  • 感谢楼主,就是版本老了点
  • 虽然版本有些老,但用着比较习惯
  • 不错,可以用,但是版本有点老,另外别忘记配置环境变量,要么就直接进那个bin目录下面
  • 还不错,但没有linux上的好用
  • 还好,就是版本太老了
  • 非常好的资源,谢谢
  • 还不错,挺喜欢
  • 不错,可以用,但是版本有点老,另外别忘记配置环境变量,要么就直接进那个bin目录下面