About sublime text 3 compiling C++ records

 

To compile C++ in sublime text 3, MingW needs to be installed.

Install MingW, pay attention to Figure 3, you need to wait for the download and installation, until the continue flashes, you can continue to the next step.

If the installation fails, just press quit to exit, and repeat the installation once or twice.

After the installation is passed, the following interface will appear after the next step, and you can check the red box.

Then press installation>apply changes in the upper left corner.

Then the following interface appears. Press apply and it will be installed automatically. When the string of long words in Figure 2 appears, you can exit, and you can exit the original interface.

Then set the environment variable:

Find the bin folder in the mingw directory you just installed, for example, mine is C:\MinGW\bin, and record the path of the bin directory.

Right-click Computer, select Properties, then click Advanced System Settings, click Environment Variables

Then find Path in System Variables (not User Variables!!!) and double click it.

My interface is WIN10, create a new and write down the bin folder path just recorded, and then press OK. Pay attention to the input method, don't use the Chinese input method! ! ! !

If it is a WIN7 system, an interface smaller than this will appear, add a semicolon at the end of the variable value, then write the bin folder path, and then press OK. Also pay attention to the input method, do not use the Chinese input method.

The last step is to test if the installation is successful.

Press win key + R to open CMD. Type gcc -v and press enter.

 

If you see the string of words in the red box, it means the installation is successful.

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325111306&siteId=291194637