From aec4b1fbcd5756bd2c0a9bd95d574ce482ba2390 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 18 Mar 2024 07:52:19 +0100 Subject: [PATCH] Move includes out of extern "C" block "mbdtools.h" couldn't be included from C++ files, because the "glib.h" include is in the extern "C" block. The latter includes C++ headers for C++ source files, which define templates. These don't work with extern "C" linkage and the compilation falls apart with numerous errors. To fix this problem, move the includes out of the extern "C" block. --- include/mdbtools.h.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/mdbtools.h.in b/include/mdbtools.h.in index acc9309..a543897 100644 --- a/include/mdbtools.h.in +++ b/include/mdbtools.h.in @@ -21,9 +21,6 @@ #define MDBTOOLS_H_HAVE_ICONV_H @HAVE_ICONV_H@ #define MDBTOOLS_H_HAVE_XLOCALE_H @HAVE_XLOCALE_H@ -#ifdef __cplusplus - extern "C" { -#endif #include #include #include @@ -48,6 +45,10 @@ #include #endif +#ifdef __cplusplus + extern "C" { +#endif + /** \addtogroup mdbtools * @{ */