NO

Author Topic: View source code output from pre-processor?  (Read 2854 times)

PhilG57

  • Guest
View source code output from pre-processor?
« 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. 

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: View source code output from pre-processor?
« Reply #1 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
...

May the source be with you

PhilG57

  • Guest
Re: View source code output from pre-processor?
« Reply #2 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.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: View source code output from pre-processor?
« Reply #3 on: September 14, 2010, 06:20:27 PM »
Use option:
/P                 Preprocess only (to srcfile.i)
May the source be with you