How do I generate an error or warning in the C preprocessor?

Place anywhere:

#ifndef DEBUG
#error "Only Debug builds are supported"
#endif

For reference: Diagnostics

Leave a Comment