The solution is simple:
Right click on project, select Properties
. Go under C/C++ Build
, Settings
. Select the Release configuration, then GCC C++ Compiler
, Preprocessor
. Under Defined symbols (-D)
add NDEBUG
. This worked for me.
Question
My program built in release mode fails on assertions.
How can I setup eclipse to generate a binary which doesn't compute assert()
calls?
Solution
The solution is simple:
Right click on project, select Properties
. Go under C/C++ Build
, Settings
. Select the Release configuration, then GCC C++ Compiler
, Preprocessor
. Under Defined symbols (-D)
add NDEBUG
. This worked for me.