using VC++ 6.0 I have a piece of code that I want compiled only when I build the debug version and a diffeerent section of code I want compiled only when I build the release version. anyone know what the preprocessor directives are for doing this?
Printable View
using VC++ 6.0 I have a piece of code that I want compiled only when I build the debug version and a diffeerent section of code I want compiled only when I build the release version. anyone know what the preprocessor directives are for doing this?
The pre-processor symbol NDEBUG is defined when you do a release build.
Seems dangerous to me. Debug code should only contain "extra" code - to help you debug it, not different code between debug and release.
Thanks, what Im doing is skipping the anti-debugger check in the debug code, since I want to be able to use a debugger during development, and including it in the release, since I dont want people reverse engineering my software. While Im sure its still possible to RE even with this check i just want to make it as difficult as possible.
It might slow down someone who is good by all of about 5 seconds.
Just long enough for them to knobble the "isDebuggerPresent" into always returning false.