How to run preprocessor only?! (HELP!)

Post: #1
Hi, guys!
I've been writing some special tool for making search through obective-c source code.
And now, I've got a problem with compilation stages.
There is need to preprocess whole source code at the first time before searching, and which takes modified modules only.

Well, it's like to run my own script instead gcc during building project, so that I would insert -E flag in gcc calling.
Thank you!
Sorry for my English.
Quote this message in a reply
Posts: 75
Joined: 2002.04
Post: #2
You can invoke the GNU C preprocessor with the cpp command.

Is that what you are asking about?

Chris Burkhardt
Quote this message in a reply
Posts: 1,487
Joined: 2002.09
Post: #3
From the GCC man page:

-E  Stop after the preprocessing stage; do not run the compiler proper.
           The output is in the form of preprocessed source code, which is
           sent to the standard output.

           Input files which don't require preprocessing are ignored.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Post Reply