I have the first line in the file as:
#define DEBUG
In my program I have used this variable as:
#region Preprocessor directives
#if DEBUG
#error DEBUG is defined
#endif
#endregion
I get this error upon compilation: #error: 'DEBUG is defined'.
Am I mistaking anything?
generate an error from a specific location in your code: https://msdn.microsoft.com/en-us/library/x5hedts0.aspx (I'll post this as an answer as well in a minute)