Skip navigation

show C preprocessor output

545 Views 7 Replies Latest reply: Jul 10, 2012 9:13 AM by rccharles RSS
rccharles Level 5 Level 5 (5,150 points)
Currently Being Moderated
Jul 8, 2012 11:39 AM

I am having trouble with includes & macros written in C.  I would like to see how the proprocessor code expands.

 

I am using xtool 2.x.  It's old, so I'll take whatever generic help you may offer.

 

I would like the preprocessor/compiler to generate the preprocess output and continue with the complile.

 

Robert

  • Mark Szymczyk Level 4 Level 4 (1,865 points)
    Currently Being Moderated
    Jul 9, 2012 9:39 AM (in response to rccharles)

    When you say xtool, do you mean Xcode? I don't have access to Xcode 2, but in Xcode 3 you can choose Build > Preprocess to generate the preprocessor output. I would assume Xcode had a similar menu item, but the Build menu might have a different name, such as Run or Project.

  • Mark Szymczyk Level 4 Level 4 (1,865 points)
    Currently Being Moderated
    Jul 9, 2012 12:16 PM (in response to rccharles)

    Try opening the build results window. Your screenshot shows how to access it. The editor at the bottom of the build results window should show the output.

  • Mark Szymczyk Level 4 Level 4 (1,865 points)
    Currently Being Moderated
    Jul 9, 2012 6:05 PM (in response to rccharles)

    Xcode is not going to create a new file in your project folder with the preprocessed output. Try selecting a .c file from the Groups and Files list before choosing Build > Preprocess. When I do this with a C++ file, I get preprocessed output where it says No Editor in your screenshot. I also get preprocessed output in the editor that is attached to the project window. If you don't see the editor, drag the separator at the bottom of the project window to show the editor.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.