Douglas Alan
2007-02-12 18:19:18 UTC
Hi. Is there an option to gcc/g++ to tell it to save the preprocessor
output to a file (let's say a ".E" file or something), in *addition* to
doing its normal compilation?
I know about the -E option, but this causes gcc to write the
preprocessor output to stdout, *instead* of generating .o files. On a
project I'm working on, we have a rather complex Makefile arrangement
(actually CMake), and so running "g++ -E" directly on the individual
.cxx file that I want to debug is not so trivial. It would be a lot
more convenient if I could, say, just add an option to CFLAGS, in
addition to "-g", or what have you, and have everything compile
exactly as before, only with the addition that .E files (or whatever)
are written out right next to all the .o files.
|>oug
output to a file (let's say a ".E" file or something), in *addition* to
doing its normal compilation?
I know about the -E option, but this causes gcc to write the
preprocessor output to stdout, *instead* of generating .o files. On a
project I'm working on, we have a rather complex Makefile arrangement
(actually CMake), and so running "g++ -E" directly on the individual
.cxx file that I want to debug is not so trivial. It would be a lot
more convenient if I could, say, just add an option to CFLAGS, in
addition to "-g", or what have you, and have everything compile
exactly as before, only with the addition that .E files (or whatever)
are written out right next to all the .o files.
|>oug