run c precompiler alone

Discussion in 'C Programming' started by rembremading, Feb 23, 2008.

  1. rembremading

    rembremading Guest

    Hi all!

    maybe somebody here knows whether there exists a way to view the source code
    after it ran through the precompiler.
    Or, if this is unreadable if there
    I have a code with many precompiler commands in it and I would like to see
    the code after such statements like
    #ifdef SOMETHING
    ....
    #endif
    if SOMETHING has not been defined, have been removed.
    I am using gcc.

    Thanks,

    Andreas
     
    rembremading, Feb 23, 2008
    #1
    1. Advertising

  2. rembremading

    Remo D. Guest

    rembremading ha scritto:

    > maybe somebody here knows whether there exists a way to view the source code
    > after it ran through the precompiler.


    It depends on the compiler you're using. Try cpp.

    Remo.D
     
    Remo D., Feb 23, 2008
    #2
    1. Advertising

  3. rembremading

    rembremading Guest

    Thanks, that's what I searched for. Sorry for being off-topic.

    Daniel Kraft wrote:

    > rembremading wrote:
    >> Hi all!
    >>
    >> maybe somebody here knows whether there exists a way to view the source
    >> code after it ran through the precompiler.
    >> Or, if this is unreadable if there
    >> I have a code with many precompiler commands in it and I would like to
    >> see the code after such statements like
    >> #ifdef SOMETHING
    >> ...
    >> #endif
    >> if SOMETHING has not been defined, have been removed.
    >> I am using gcc.

    >
    > Depends on your compiler (i.e., gcc), so off-topic here. However, I
    > think gcc -E does the job.
    >
    > Daniel
    >
     
    rembremading, Feb 23, 2008
    #3
  4. rembremading

    Daniel Kraft Guest

    rembremading wrote:
    > Hi all!
    >
    > maybe somebody here knows whether there exists a way to view the source code
    > after it ran through the precompiler.
    > Or, if this is unreadable if there
    > I have a code with many precompiler commands in it and I would like to see
    > the code after such statements like
    > #ifdef SOMETHING
    > ...
    > #endif
    > if SOMETHING has not been defined, have been removed.
    > I am using gcc.


    Depends on your compiler (i.e., gcc), so off-topic here. However, I
    think gcc -E does the job.

    Daniel

    --
    Done: Bar-Sam-Val-Wiz, Dwa-Elf-Hum-Orc, Cha-Law, Fem-Mal
    Underway: Ran-Gno-Neu-Fem
    To go: Arc-Cav-Hea-Kni-Mon-Pri-Rog-Tou
     
    Daniel Kraft, Feb 23, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Loane Sharp

    precompiler error

    Loane Sharp, Dec 26, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    488
    Loane Sharp
    Dec 26, 2004
  2. Suzanne Vogel
    Replies:
    2
    Views:
    2,638
    Suzanne Vogel
    Jun 26, 2003
  3. Martin Stich

    Precompiler question

    Martin Stich, Dec 2, 2003, in forum: C++
    Replies:
    7
    Views:
    430
    Chris Theis
    Dec 3, 2003
  4. JohnQ
    Replies:
    22
    Views:
    783
    JohnQ
    Jun 12, 2007
  5. Plotinus
    Replies:
    2
    Views:
    325
    Tad McClellan
    Dec 17, 2004
Loading...

Share This Page