For the second blog park job-related operations

The first step, download MinGW-w64
1. Click MinGW-w64 official website to download address , download.
Reference interface as shown below

2. The individual is not recommended to download the installation package, installation package will be stuck there for a long time will not move, you can click MinGW-w64 compression package download address , go to the download page do not worry, wait for a while will pop up a to download the file, this is a compressed package, need to use decompression software to decompress. Note to remember the location of their store-extracting file, behind this is useful! ! ! !
3. will be named after decompression mingw64 file folder in the location to extract the files in your set point to open will find multiple folders and a text file (.txt), and then opening the folder name for the bin folder, this folder to store those compiler tool. In my particular style used in computer, for example, (Note: Different computer storage location may be different) as shown



position 4. Copy the following figure (shown in blue is that a place) address (for the next step to pave the way)

The second step, change the environment variables (the fourth point has already been copied address MinGW-w64 in the bin folder, then just add it to the system's environment variable)
This step and MinGW-w64 installation tutorial 26-32 is the same (due to the original tutorial has been very detailed, and I repeat this is not too much, in fact, I have to steal lazy, Oh, so the students find their own trouble are you, thank you)

The third step is to install MinGW-w64 (just unzip the file before, and did not actually installed)
1. Open a command prompt to have a search under the (win10 systems, like direct search, there is a universal application should be the win + r into operation interface, input cmd, click OK or eNTER (win + r operations shown below))


2. install MinGW-w64 (input at the command prompt gcc -v carriage will then appear as follows Figure) ( Note gcc trailing space )

Note: If your "command prompt" shows a long list of component information, it means you have installed the MinGW-w64 done, congratulations!

The fourth step, using MinGW-w64 compile the source code (which is the most important job is here)
1. Create the file C: create a text file (.txt), to change the suffix (.c) will it changed into a C language source code file
2. write the source code: the C file that comes with Windows Notepad or any text editor to open the file C language source code, source code input will be used for testing and save this test the source code can be used with Hello World, but need a little change on the basis of the code book, the source code later on I will picture displayed.
3. Compile the source code : (MinGW-w64 is a command-line tool without a graphical user interface, the operation needs to be compiled at the command prompt.) First we open a command prompt and navigate to the directory you want to work the storage location of the source code files this step is very important, no contact with command-line tools, often go wrong here. Here I give a few practical examples

  • C from a directory to the root directory of the disc rotation drive D (D:) ------- after the type D: and hit enter Example: C: \ Users \ lenovo> D: ----- > D:
  • C from a directory to the root directory of the disk drive C (C:) ------- after the input cd \ then enter Example: C: \ Users \ lenovo> cd -----> C :
  • C from a directory to another directory disk in this directory after the input cd + ------- folder address and press Enter embodiment; C:> cd + Users \ lenovo -----> C: \ Users \ lenovo ( note here cd trailing space and the "+" I am just used to describe, in practice not input )
  • C language source code files (.c) compiled as executable program (.exe) --------- gcc + C input after the file name and then return Example: ..... (not) .. ....> gcc + Hello.c ------> a.exe ( Note that here there is a space behind the gcc and the "+" I am just used to describe, in practice not input )

Guess you like

Origin www.cnblogs.com/just-like-this/p/11614362.html