djfish's studio

2/25/2009

five processors

program pass through five different processors before it is ready to be executed
1.EDITOR:input,form terminal
output;a source code file containing C source code and (maybe) preprocessor commands
2.PREPROCESSOR:input,source code file
output,source code file with macros expanded and other files included as indicated by preprocessor commands
3.COMPILER:input,source code file with macros expanded,etc.
output,assembly language source code
4.ASSEMBLER:input,assembly language source code file
output,relocatable object code
5.LINKER:input,relocatable object code modules from your programs and from C library
output,executable code
The macro preprocessor will not expand macro names placed inside quotation marks.
Conditional Compilation,
debug use
#include DEBUG
#ifdef DEBUG
printf("in func_1,x=%d\n",x);
#endif

No comments:

Post a Comment