Install g++ on Windows

Source: Internet
Author: User

Install c++/g++ on Windows

Install c++/g++ on Windows link source 1. It's a hint:

Pick the drive and a folder in which you want to install g++. I ' ll assume that it's C:, but 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 Downloads Full.exe

The security of this file does not understand, anyway downloaded after the installation of some of the instructions that are commonly seen in Linux. exe files such as ls mv ... (This surprised me, I am a boy who likes to be in the Linux code) after downloading, click Install.

3 Adding environment variables

Start -> Control Panel -> System -> Advanced -> Environment VariablesDouble-click PATH Edit to ; add an environment variable as a separate path: C:\cygnus\cygwin-b20\H-i586-cygwin32\bin This path should be the same. Be careful not to use the PWD command and then copy the path, as the slash will look like /cygnus/cygwin-b... this because there is this program under which file path pwd.exe . It's been a pit.

4 restart

g++ -g hello.cpp -o hello -lmThis command is going to work.
And some useful Linux commands
warming: A 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 the compiler came from, we downloaded it from the older site of Http://source ware.org/cygwin/

Install g++ on Windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.