TCC's dapper, fast-compiling, and unique direct-running C-code functionality allows TCC to become an excellent compiler across the Linux,windows platform.
The author is still in the study C (ANSI C/iso C) stage, in order to strengthen the ability of handwriting code, so there is this compiler using the technique.
Here is a cumbersome sentence:
Handwriting and compile the link code, for most people this is not conceivable, I use VC, the last thing to use VS, it is difficult for many people to imagine,
This is done in order to be able to expect to compile a short or OS-free C code without relying on a higher version of the C runtime, such as vcruntime7,8,9 or later versions.
Also expect to be able to write some code in bad environment.
Save the following batch to Tcc.bat saved in the root directory of the TCC installation directory, such as the author installed in the D:\DEVELOP\TCC directory, the following code is saved to D:\DEVELOP\TCC, the final file absolute path
D:\develop\tcc\tcc.bat
@echo offEchostart----------------------TCC----------------------compile information. exe%1-vv-benchEcho----------------------preprocessing begins------------------------TCC. exe%1- eEcho----------------------preprocessing End------------------------Echo----------------------compile information ends----------------------EchoThe directory where the Build program is compiled%~DP1EchoThe results of the program run as follows:Echo--------------------------------------------------------%~n1Echo--------------------------------------------------------
Then add it to the system environment variable path
Methods: Right-click "My Computer"-"Properties", system variables, find the PATH variable, click "Edit", press the Home key, navigate to the beginning of the line, enter D:\DEVELOP\TCC;
The following is the test code and the use
//print.h #define PR printf#define nl "\ n"#define D "%d"#define D1 d nl#define D2 d d NL#define D3 D NL
// file1.c " print.h " Main () { int123; PR (d1,a); PR (d2,a,b); PR (d3,a,b,c);}
Set up a compilation environment where TCC can be called anywhere