14

Possible Duplicate:
Where does the -DNDEBUG normally come from?

I am using assertions in my code, but I don't know if they will trigger, because I don't know if NDEBUG is defined or not. Am I supposed to to specify the -DNDEBUG explicitly during compilation?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
StackedCrooked
  • 34,653
  • 44
  • 154
  • 278

1 Answers1

19

Yes. GCC by itself does not set that flag. It is usually set by the makefile generator, like Automake, CMake or QMake.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Gianni
  • 4,300
  • 18
  • 24