[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] assert doesn't work in ns?





Li Li wrote:

>  c++ "assert" statement doesn't work in my ns-2.1b6 c++ code. I have tested
> it with simple c++ programs using the same c++ compiler. It works fine. So
> it's not a compiler problem. Can anyone tell me how to make assert work in
> ns c++ code?
>
> Thanks,
>
> Li

If you look in the Makefile, you will see that NDEBUG is defined, so assert()
macro tests are disabled. You can probably just remove -DNDEBUG from DEFINE in
the Makefile to enable asserts. Check "man assert" for more information.

-- Felix Hernandez