Download and environment configuration for MinGW

Source: Internet
Author: User

1. Download MinGW Installer on MinGW website

2. Tick the required components in the installation screen, mark the right interface, select Apply change in the menu bar installation, wait for the installation

3. Environment configuration: In the environment variable path, add the MinGW Bin directory path to path.

4. Inspection

1) Create a new HELLOWORLD.C file under the C drive with the following source code:

#include <stdio.h>

Main () {
printf ("Hello world!\n");

return 0;
}


2) Compile.
C:\>gcc-o Helloworld.exe HELLOWORLD.C

3) run.
C:\>helloworld.exe
Hello world! This is my first C program!

1) Create a new Helloworld.cpp file under the C drive with the following source code:

#include <iostream>

Main () {
Std::cout << "Hello world! This is my first C + + program! "<< Std::endl;

return 0;
}


2) Compile.
c:\>g++-O helloworld.exe helloworld.cpp

3) run.
C:\>helloworld.exe
Hello world! This is my first C + + program!

Download and environment configuration for MinGW

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.