C Preprocessor Workshop for junior developers
-
.pptx - presentation in PowerPoint
-
.pdf - presentation in PDF
-
.c, .h - short lessons and demo
cpp <source file name> -o <output file name>
For example:
cpp 1_simple.c -o 1_simple.cpp
gcc -E <source file name> -o <output file name>
For example:
gcc - E 1_simple.c -o 1_simple.cpp
If you need define macro TEST
you should pass to gcc/cpp key -D
as defined in the following example:
gcc 1_simple.c -DTEST -o 1_simple.o
If you need setup some values you should use quotes as in following example (equals to #define TEST 4
):
gcc 1_simple.c -DTEST="4" -o 1_simple.o