Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Different code paths for DEBUG and RELEASE builds

Icarus49Icarus49 Member Posts: 9
I'm using MS Visual C++ V6.0 and want to print messages to stdout for Debug builds and not for Release builds. Does VC++ set a flag or define a macro or something for the different builds that I can use?

e.g.

#ifdef DEBUG
printf(....)
#endif

Thanks

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : I'm using MS Visual C++ V6.0 and want to print messages to stdout
    : for Debug builds and not for Release builds. Does VC++ set a flag or
    : define a macro or something for the different builds that I can use?
    :
    : e.g.
    :
    : #ifdef DEBUG
    : printf(....)
    : #endif
    :
    : Thanks

    [color=Blue]
    DEBUG is with underscore, like so:
    [/color]
    [code]
    #ifdef _DEBUG
    printf (....)
    #endif
    [/code]
  • Icarus49Icarus49 Member Posts: 9
    Thanks very much. I thought it had to be something like that.
Sign In or Register to comment.