I have a c/c++ .h file (okay .h implies c).
I have a conditional #ifdef block. In one case, the block prepares statements for input into masm. The second code block is for use in the C/C++ build.
The cl command I am playing around with is as follows.
cl /D=ASM_PREPROCESS /P /EP BootDefs.h /Fi:BootDefs.i
The code block in the .h file looks like:
#ifdef ASM_PREPROCESS
MASM statements here
#else
C/C++ statements here.
#endif
However, when I run the cl command, all I am getting are empty lines in the .i file. Clearly there is something I am doing wrong. I just wonder whether any fellow engineers see the problem. I think it is related to stdout, but for the life of me, I cannot see the correct flag to apply.
The toolset I am using is Visual Studio 2019 and latest SDK.