Place anywhere:
#ifndef DEBUG
#error "Only Debug builds are supported"
#endif
For reference: Diagnostics
More Related Contents:
- Pragma in define macro
- C Preprocessor, Stringify the result of a macro
- Can the C preprocessor perform integer arithmetic?
- Is the C99 preprocessor Turing complete?
- What exactly does an #if 0 ….. #endif block do?
- The role of #ifdef and #ifndef
- #define macro for debug printing in C?
- Why are preprocessor macros evil and what are the alternatives?
- #pragma pack effect
- How do I see a C/C++ source file after preprocessing in Visual Studio?
- Real-world use of X-Macros
- Easy way to use variables of enum types as string in C?
- How do I check OS with a preprocessor directive?
- How to detect reliably Mac OS X, iOS, Linux, Windows in C preprocessor? [duplicate]
- Stringification of a macro value
- What is the meaning of lines starting with a hash sign and number like ‘# 1 “a.c”‘ in the gcc preprocessor output?
- Combining C++ and C – how does #ifdef __cplusplus work?
- How to compare strings in C conditional preprocessor-directives
- Define preprocessor macro through CMake?
- What does ## mean for the C(C++) preprocessor?
- Representing big numbers in source code for readability?
- Can macros be overloaded by number of arguments?
- When can you omit the file extension in an #include directive?
- C preprocessor: expand macro in a #warning
- Concat two `const char` string literals
- What is a good reference documenting patterns of use of X-Macros in C (or possibly C++)?
- What is the NDEBUG preprocessor macro used for (on different platforms)?
- Is there a way to do a #define inside of another #define?
- offsetof at compile time
- Using Parentheses in Define Preprocessor Statements