-
-
Notifications
You must be signed in to change notification settings - Fork 2
Using the C preprocessor
marksvc edited this page Jun 18, 2021
·
1 revision
Sometimes it is handy to look at C or C++ files after they have been run through the preprocessor. (Also some other files and programs use this, such as IDL or some of the SQL statement generation in Fieldworks. Both the commands below write to the standard output.
To use the preprocessor in Windows, the following command may be used:
cl.exe /nologo /EP /E [-Iincludefile] input_file
To use the preprocessor in Linux, the following command may be used:
${CC-cc} -E -P -traditional -x c input_file
Also, there is a script in Fieldworks (Src/Sql/Scripts
) that will run the above command and tidy up the output.