Preprocessing source files

The Standard S32DS C/C++ Preprocessor tool enables you to evaluate the results of preprocessing of any C or CPP source file without starting the project build. The tool generates a text file in which all macros are resolved to their values.

To preprocess a source file, do any of the following:
Note: Files that are not included in the current build configuration cannot be preprocessed.

When done, the text file with the preprocessor output appears in the Project Explorer and in the editor area. If the resulting file exceeds 1 Mb in size, choose a file editor in the Editor Selection dialog box.

Each time the tool saves output to a new file with a unique name, allowing you to preprocess a source file many times, keeping the earlier results of preprocessing. To compare the output files, select them in the Project Explorer, right-click the selection, and click Compare With > Each Other on the context menu.


Comparing preprocessed output

The tool is called with the “preprocess only” option (-E) by default. To enable additional options, refer to Standard S32DS C/C++ Preprocessor in the project properties (C/C++ Build > Settings) .