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?

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top