After the MinGW is installed, it is a useful set of tools that will be included in the $/bin directory (where $ represents the installation path you chose)).
Environment settings: For our users, it is best to use tools that are simple and convenient. So, we need to set up the environment so that we can use MinGW.
For the setting, we only need to add $/bin to the path variable in the environment variable, so our GCD compilation environment will match well.
For example, my installation path is d:cbcodeblocksmingwbin; Just add the path to it.
However, we also need to use MINGW to provide us with the C + + standard library, and header files, so we need to set the system lookup path,
As follows: Environment variable name environment variable value
MinGW $ ($) Represents the installation path you have chosen, such as: D:cbcodeblocksmingw, make your own changes.
Library_path%mingw%/lib
Then use CMD to enter the path where the CPP is located, and then enter g++ hello.cpp
On the desktop will be more than one a.exe file, input command a can run and print;