Is it possible to generate preprocessor output and compilation in one step with GCC?
Something like:
gcc -E -c main.cc -o main.o
that would generate main.o and main.i
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes.
Look at
gcc-save-tempsoption.It compiles the source file and saves the result of the preprocessing in a
.ifile. (It also saves the result of the assembler phase to a.sfile).will generate
main.obut alsomain.iandmain.s.main.iis the result of the preprocessing.