Is this a stupid question, or can I specify g++ to use a program between the preprocessor and compiler?
Alternatively, I know that I can just run the preprocessor on a file (hence all the files). Then I am guessing there is a switch to run only the compiler. So I can manually invoke these two and put my program between. If so, how do I run compiler (and linker?) only?
I’d rather prefer the first method as our builder would probably not agree with me :).
To run an alternative preprocessor, the man page suggests using
-no-integrated-cppand-B.I have no experience with these, so I suggest you read the relevant parts in the man page.
Alternatively, you can run the compiler without invoking the preprocessor by telling g++ that the language is “preprocessed C++”:
g++ will also recognize files with the suffix
.iias preprocessed C++, so the pipeline becomes: