C language compilation process, installation of the GCC compiler, and setting environment variables

Source: Internet
Author: User

With my knowledge of the C language compilation process, I took a little time to draw a diagram, to provide you with a reference, I hope some of your problems can help.

A few days ago just preliminary study of C language compilation process, feeling very deep. In the C language, the header file actually played a big role.

1, header files can not need to compile
2, you can view the specific statement
3, the head file plus the implementation file of the O file submitted to the user, do not need to know the source code
4.. o files are precompiled, so the compilation time is greatly improved when the whole project is compiled.
5. When a file (A.C file) is dependent on the header file (b.h), A.O files do not need to be recompiled if the B.O files formed after B.C compilation are recompiled
6, can greatly reduce the manual copy, the wrong chance of pasting

(Installing the GCC compiler Process) You can also try to associate the compiler with a DOS window on your own Windows computer and then verify it yourself:

1, first download a mingw4.8.1.7z compiler (GCC), after decompression will MinGW4.8.1.7 the entire file in the C-disk directory,

2, SET Environment variables: Right click My Computer, point properties-"Advanced system Settings-"-"advanced-" environment variables (such as) and then:(both in the Administrator user variable set the following variable)

A, add C:\MinGW\bin in Path, remember, if there are other variables, to add a semicolon, semicolon to enter in the English mode input

b, new Library_path variable, if any, add C:\MinGW\lib to the value, here is the location of the standard library.

C, new C_includede_path variable, value set C:\MinGW\include.

C language compilation process, installation of the GCC compiler, and setting environment variables

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.