Results 1 to 4 of 4
Hi,
I would like to know how to generate preprocessor file for all the source files in my project.
For example, if my application contains only hello.c, I can use
...
- 01-24-2008 #1Just Joined!
- Join Date
- Dec 2007
- Posts
- 28
Generating Preprocessor file
Hi,
I would like to know how to generate preprocessor file for all the source files in my project.
For example, if my application contains only hello.c, I can use
gcc -E hello.c > hello.i
But if my application contains two files hello.c, hello_new.c how to generate preprocessor file individually?
Thanks in Advance
- 01-25-2008 #2Just Joined!
- Join Date
- Dec 2007
- Posts
- 28
Can anyone please help me to resolve this.
- 01-25-2008 #3
Sure, be glad to.
Your first step is to learn bash scripting. If you don't know how, google this:
It is very likely that someone else in this forum will jump in with his or her recommendation for a favorite tutorial, and that would be wonderful.Code:bash tutorial
Once you know bash scripting, then you're basically home. A handy tool is basename. For example, the command
outputsCode:basename hello.c .c
So it will be easy to tack on the .i.Code:hello
Once you've become familiar with bash scripting, if you have difficulty, post your script as you've written it so far and come back with specific questions.
Hope this helps.--
Bill
Old age and treachery will overcome youth and skill.
- 01-27-2008 #4Just Joined!
- Join Date
- Dec 2007
- Posts
- 28
Hi,
In my make file I used -save-temps option.
Now I can able to generate .i files


Reply With Quote