#define _DEBUG = 1
Declares _DEBUG as a macro that expands to = 1 , so when it expands in a conditional expression, you get
#if (= 1 == 1)
which is clearly not a valid conditional expression. You need to remove = from the macro definition:
#define _DEBUG 1
In addition, for flag macros like this, it is usually recommended to check if a macro is defined, and not a macro value. For instance,
#ifdef _DEBUG
source share