Pelles C forum

C language => Beginner questions => Topic started by: PhilG57 on September 14, 2010, 12:50:46 AM

Title: View source code output from pre-processor?
Post by: PhilG57 on September 14, 2010, 12:50:46 AM
I'd like to see the C source code produced by the preprocessor after it has read my source file and resolved the macros, #defines, etc.  Is this possible???

Thanks. 
Title: Re: View source code output from pre-processor?
Post by: TimoVJL on September 14, 2010, 06:54:48 AM
From PellesC help or commandline:

/E Runs the preprocessor only (to stdout).

Code: [Select]
>pocc.exe
Pelles ISO C Compiler, Version 6.00.6
Copyright (c) Pelle Orinius 1999-2009

Syntax:
POCC [options] srcfile{.c|.asm}

Options:
/D<name>[=<text>]  Define a preprocessor symbol
/E                 Preprocess only (to stdout)
/Fo<outfile>       Name the output file
...

Title: Re: View source code output from pre-processor?
Post by: PhilG57 on September 14, 2010, 04:42:35 PM
Thanks.  I could not get the /Fo to create an output file I could later view but I was able to wade through the listing provided in the 'Project' window of the compiler.  Thanks again.
Title: Re: View source code output from pre-processor?
Post by: TimoVJL on September 14, 2010, 06:20:27 PM
Use option:
/P                 Preprocess only (to srcfile.i)