C Language Comprehensive study 1
Build a TCC Environment
Research process:
The question arises: why use the TCC environment, even the graphical interface, why use such a sublimation?
According to the nature of our study, it may be to experience the underlying characteristics of C language, but in the study 1 is not able to understand this, so this question to follow-up answer
We put the relevant files in the DOS environment in the C drive, write a simple C program with Notepad.
Use the C:\C\TCC A.C command to compile the. c file.
Found, tip error: Unable to find the A.C file.
So should the path be unrecognized, or is it a related issue? So presumably, does the TCC environment require file support for an index path when working?
Then we used such as MINIC\TC c\a.c. found that the A,c file can be found and opened, so it concludes that the path problem is not determined by the TCC, but by the operating system DOS. Although considering this point, but still do not know how to do, so Baidu
Finally know that you should use the CD c\ command to change the directory to c:\c>
Such a smooth compilation connection generates a A.exe file.
But I still don't know why this is the reason why TC didn't have this problem.
Then in Curiosity, Deleting tlink.exe will result in the ability to generate only. obj files, but cannot generate an. exe file, and if you do not delete Tlink.exe discovery you can generate the. exe file directly, indicating that the Tcc.exe program has the function of invoking the Tlink.exe program, which itself can implement the compile function.
The following attempt was made to recall the previous study, after Tlink.exe deleted, the other necessary files were deleted, and it was found that it was still possible to generate. obj files, stating that these files were not required during the compilation phase, and this again explains what is: Connection!
After doing this, run the generated. exe file and display the "Hello world! ”。
Resolved:
1. Through this research, the most basic thing is to build a TCC environment and compile a connection to the. c file to generate the. exe file.
2. Recognizing that TCC is responsible for generating the. obj file, Tlink is responsible for generating the. exe file, but TCC calls the Tlink file.
3. The previous study was reviewed to further understand the concept of "compilation", "Connection"
Not resolved:
1.TCC doesn't even have a graphical interface, why do we use TCC?
2. The textbook says there are two sections of the maximum 64K, how can I verify? Well, what does this mean?
Sentiment:
By establishing the TCC Environment, the compilation connection to the. c file is achieved, in general, TCC has a lot less file than TC, which is extremely helpful for us to study C language, allowing us to grasp something more central and ignore what we don't need to know at this stage.
Study on the new compiler environment of C language TCC