The Preprocessor Index
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 | -Eor--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.iwith 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.1with 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
- Preprocessor Directives
- Defining and Undefining Macros
- Macros with Parameters (C++)
- Predefined Macros
- Delphi Compatibility Macros
- Using the '\' Backslash for Line Continuation
- #pragma Directives
- #pragma alias
- #pragma alignment
- #pragma anon_struct
- #pragma argsused
- #pragma checkoption
- #pragma codeseg
- #pragma defineonoption and #pragma undefineonoption
- #pragma exit
- #pragma hdrfile
- #pragma hdrstop
- #pragma inline
- #pragma intrinsic
- #pragma link
- #pragma messages
- #pragma nopushoptwarn
- #pragmaobsolete
- #pragma once
- #pragma option
- #pragma pack
- #pragma package
- #pragma region and #pragma end_region
- #pragma resource
- #pragma startup
- #pragma undefineonoption
- #pragma warn
 
- Pseudo-grammar