Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
I'm trying to get the preprocessor output for a file, but when I go to Product->Build Action, I see that the "Preprocess xxxxxxx.h" menu option is grayed out. Could it be because it was already compiled?
 
By themselves, headers don't have build products. That is, they don't produce a .o file.

You can only perform Preprocess on files that have build products (.m, .c, .cpp, etc.).

If you only want a single .h file preprocess, then make a temporary .c (or .m or whatever) file that has a single line #including or #importing the header you want preprocessed.
 
By themselves, headers don't have build products. That is, they don't produce a .o file.

You can only perform Preprocess on files that have build products (.m, .c, .cpp, etc.).

If you only want a single .h file preprocess, then make a temporary .c (or .m or whatever) file that has a single line #including or #importing the header you want preprocessed.
Got it, thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.