From 1ea760a1752743f62a7abd01a89e4d8ffdd594d9 Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Wed, 24 Dec 2014 13:11:45 +0000 Subject: Fix compilation errors in globals.c with MinGW/gcc -xc++ error: external linkage required for symbol 'PL_charclass' because of 'dllexport' attribute and likewise for many other symbols declared EXTCONST. --- INTERN.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'INTERN.h') diff --git a/INTERN.h b/INTERN.h index da3057a83c..39b48f4f1b 100644 --- a/INTERN.h +++ b/INTERN.h @@ -29,10 +29,17 @@ # define dEXTCONST globaldef {"$GLOBAL_RO_VARS"} readonly #else # if (defined(WIN32) && defined(__MINGW32__)) || defined(__SYMBIAN32__) -# define EXT __declspec(dllexport) -# define dEXT -# define EXTCONST __declspec(dllexport) const -# define dEXTCONST const +# ifdef __cplusplus +# define EXT __declspec(dllexport) +# define dEXT +# define EXTCONST __declspec(dllexport) extern const +# define dEXTCONST const +# else +# define EXT __declspec(dllexport) +# define dEXT +# define EXTCONST __declspec(dllexport) const +# define dEXTCONST const +# endif # else # ifdef __cplusplus # define EXT -- cgit v1.2.1