diff --git a/src/pugixml.cppm b/src/pugixml.cppm index 6cdce354..3b58b032 100644 --- a/src/pugixml.cppm +++ b/src/pugixml.cppm @@ -59,7 +59,13 @@ import std.compat; # pragma clang diagnostic push # pragma clang diagnostic ignored "-Winclude-angled-in-module-purview" #endif +#if !defined(PUGIXML_HEADER_ONLY) +extern "C++" { +#endif #include +#if !defined(PUGIXML_HEADER_ONLY) +} +#endif #if defined(__clang__) # pragma clang diagnostic pop #endif