From e3ed95bfcbfadf754a10e1f61fa0dc29a1994708 Mon Sep 17 00:00:00 2001 From: Eric Cosatto Date: Tue, 24 May 2016 14:35:25 -0400 Subject: [PATCH] Make it produce a useable dll/lib under Windows --- jmorecfg.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jmorecfg.h b/jmorecfg.h index 679d68b..a020529 100644 --- a/jmorecfg.h +++ b/jmorecfg.h @@ -242,11 +242,16 @@ typedef unsigned int JDIMENSION; #define METHODDEF(type) static type /* a function used only in its module: */ #define LOCAL(type) static type + +#ifdef _WIN32 +#define GLOBAL(type) __declspec(dllexport) type +#define EXTERN(type) extern __declspec(dllexport) type +#else /* a function referenced thru EXTERNs: */ #define GLOBAL(type) type /* a reference to a GLOBAL function: */ #define EXTERN(type) extern type - +#endif /* This macro is used to declare a "method", that is, a function pointer. * We want to supply prototype parameters if the compiler can cope.