From f517db5df01b129fdcdef87185866404424e6dae Mon Sep 17 00:00:00 2001 From: bstoeger <32835590+bstoeger@users.noreply.github.com> Date: Mon, 13 May 2024 15:12:45 +0200 Subject: [PATCH] Move includes out of extern "C" block (#435) "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 * @{ */