How to catch C headers being included outside "extern "C" {}"?

Viewed 51

When including C headers in C++ code it's necessary to put them within "extern "C" {}" to avoid name mangling. Failling to do so gives errors which are not easily connected to the original mistake.

Is there a good solution to this? E.g. a way to catch these errors earlier or get more descriptive error messages?

0 Answers
Related