Post-pre-processer? 
Author Message
 Post-pre-processer?

Hi!

In VC++ 7 I want to run a program after the pre-processer but before the
compiler.  I checked the project configuration and found something that
might do the trick.  Under "Build Events" there are 3 configuration options.
"Pre-Build Event", "Pre-Link Event" and "Post-Build Event".  Now where is
the one I need?  Where is the "Pre-Compiler Event" or "Post-Pre-Processer
Event"?

Isn't there anyway to run a program like this directly from VC++ 7?

, Espen



Wed, 05 Oct 2005 22:10:44 GMT  
 Post-pre-processer?


Quote:
> Hi!

Greetings.

Quote:
> In VC++ 7 I want to run a program after the pre-processer but before the
> compiler.  I checked the project configuration and found something that
> might do the trick.  Under "Build Events" there are 3 configuration options.
> "Pre-Build Event", "Pre-Link Event" and "Post-Build Event".  Now where is
> the one I need?  Where is the "Pre-Compiler Event" or "Post-Pre-Processer
> Event"?

It does not exist.

Quote:
> Isn't there anyway to run a program like this directly from VC++ 7?

The IDE is good for doing common things easily.
It is not intended to make doing weird things
easy, but it does accommodate them by allowing
custom build steps.  Your custom build will have
to run the preprocessor, then apply your special
filter to the result, then run the compiler on
the filter output.  You may want to encapsulate
that sequence into a batch file and simply run
the batch file as a pre-link event.

--
-Larry Brasfield
(address munged, s/sn/h/ to reply)



Thu, 06 Oct 2005 04:13:07 GMT  
 Post-pre-processer?


Quote:
> Hi!

> In VC++ 7 I want to run a program after the pre-processer but before
> the compiler.  I checked the project configuration and found
> something that might do the trick.  Under "Build Events" there are 3
> configuration options. "Pre-Build Event", "Pre-Link Event" and
> "Post-Build Event".  Now where is the one I need?  Where is the
> "Pre-Compiler Event" or "Post-Pre-Processer Event"?

> Isn't there anyway to run a program like this directly from VC++ 7?

There is no such thing normally.

The compiler normally preprocesses as it parses (this reduces the build
time.)

In fact, if you seperate preprocessing from building it can change the
parser's behavior in a few subtle ways like:
1) Attribute blocks now experience preprocessor expansion (normally the
parameters to an attribute can macro-expand but the attributes themselves
cannot.)
2) #pragma warning changes do not take effect (so a pragma to turn off a
preprocessor related diag won't help)
3) Some tokenization differences will occur on the following parse (consider
"#define A(a) a<newline>A(int)main(){}" which is fine but when preprocessed
seperately preprocesses to "intmain(){}" which isn't what is parsed the
first time "int<token boundry>main(){}".)

--
Jeff Peil



Fri, 07 Oct 2005 16:47:07 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Post-fix and pre-fix

2. Pre/Post increment vs. Operator precedence and associativity

3. pre-post increment ammended

4. pre-post increment operators help

5. pre-increment v.s. post-increment

6. Pre or post?

7. Post Pre-processor Output?

8. Pre-clean step in VC Project (like Post-build)

9. pre increment and post increment

10. Post Pre-processor Output?

11. pre\post increment Operator overloading

12. worker thread without 100% processer usage

 

 
Powered by phpBB® Forum Software