Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: jmccay on April 27, 2006, 02:40:19 am

Title: debug macro
Post by: jmccay on April 27, 2006, 02:40:19 am
  How does linux (& windows) handle the debug macro?

#define DEBUG

or

#define _DEBUG

  Is this a defacto standard for g++?

   Also, is there anything that is define automatically when including debugging information?

jmccay
Title: Re: debug macro
Post by: thomas on April 27, 2006, 09:39:51 am
I don't know about a DEBUG "standard", but there is a NDEBUG "standard".

If you define NDEBUG, then the preprocessor evaluates assert() to nothing (assert is simply a macro).
Everything else is home-made stuff and not standard.