diff --git a/src/diagnostic.h b/src/diagnostic.h index 178e769d05..3d95520adf 100644 --- a/src/diagnostic.h +++ b/src/diagnostic.h @@ -75,9 +75,17 @@ enum { extern int _log_levels[DIAGNOSTIC_LEVEL_COUNT]; +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + void diagnostic_log(int diagnosticLevel, const char *format, ...); void diagnostic_log_with_location(int diagnosticLevel, const char *file, const char *function, int line, const char *format, ...); +#ifdef __cplusplus +} +#endif // __cplusplus + #ifdef _MSC_VER #define diagnostic_log_macro(level, format, ...) diagnostic_log_with_location(level, __FILE__, __FUNCTION__, __LINE__, format, __VA_ARGS__)