The Preprocessor Index

From RAD Studio
Jump to: navigation, search

Go Up to C++ Language Guide Index

This section contains C++Builder preprocessor topics.

The preprocessor is a text processor that performs preliminary operations on C and C++ files before they are passed to the compiler. The C++Builder compiler normally invokes the preprocessor in its first pass to convert the text of a source file as part of the first phase of translation. You can also invoke the preprocessor separately, using the command-line preprocessor CPP32.EXE, to process text without compiling. You can use the preprocessor to insert files, conditionally compile code, apply macro substitutions of code, specify compile-time error messages, and apply machine-specific rules to sections of code.

Invoking the C++ Preprocessor

C++ Compiler Platform Operation
BCC32C 32-bit Windows -c- Xclang
BCC32X 32-bit Windows -E
BCC64 64-bit Windows -E
BCC64X 64-bit Windows -E or --preprocess
BCCIOSARM64 64-bit iOS -E
BCCAARM Android -E
Note: For BCC32C some may be accepted and silently ignored.

Invoking the C++ Preprocessor with Command-Line Interfaces of C++ Windows Compilers

Platform Classic Compiler Clang-based Compiler Prepocessing Notes
32-bit Windows BCC32C.EXE cpp32.exe test.cpp Creates test.i with preprocessed output.
BCC32C.EXE bcc32x -E test.cpp Preprocessed output sent to stdout: use -o <file> to write output to a file.
BCC32.EXE cpp32.exe test.cpp Creates test.1 with preprocessed output.
64-bit windows BCC64.EXE bcc32x -E test.cpp Preprocessed output sent to stdout: use -o <file> to write output to a file.

Topics