12

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?

Community
  • 1
  • 1
StackedCrooked
  • 33,620
  • 41
  • 145
  • 274

1 Answers1

16

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

Gianni
  • 4,160
  • 17
  • 23