I\'m generating preprocessor output (.i) from Visual Studio, but also want to do the actual build. Is there a combination of flags that will both output the .i file without then
Use the switch /P Example- cl /C sample.c
The above will generate a .I file with same name (sample.I). Now to compile the .I file, just rename .I file to .C then do cl /c to compile and generate an object file.
You can create a custom build config that does pre-processing and then define a batch build that builds the pre-processed version followed by the actual compiled / linked version.
You can add a custom build step or a new target to dump the preprocess after the code is built by definition the dumped preprocessor output is what is built.