From e5da085b75ff7c33a10ac2b03434d487c47340f2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 2 Mar 2015 17:14:31 +0000 Subject: Fix compilation with -fvisibility=hidden. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5611 a436a847-0d15-0410-975c-d299462d15a1 --- ingen/ingen.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ingen/ingen.h') diff --git a/ingen/ingen.h b/ingen/ingen.h index ba873c75..be9fde29 100644 --- a/ingen/ingen.h +++ b/ingen/ingen.h @@ -17,6 +17,23 @@ #ifndef INGEN_H #define INGEN_H +#ifdef INGEN_SHARED +# ifdef _WIN32 +# define INGEN_LIB_IMPORT __declspec(dllimport) +# define INGEN_LIB_EXPORT __declspec(dllexport) +# else +# define INGEN_LIB_IMPORT __attribute__((visibility("default"))) +# define INGEN_LIB_EXPORT __attribute__((visibility("default"))) +# endif +# ifdef INGEN_INTERNAL +# define INGEN_API INGEN_LIB_EXPORT +# else +# define INGEN_API INGEN_LIB_IMPORT +# endif +#else +# define INGEN_API +#endif + #define INGEN_NS "http://drobilla.net/ns/ingen#" #define INGEN__Arc INGEN_NS "Arc" -- cgit v1.2.1