From 5b36db63f3aeb512264b0f38cec2a5a486829fd1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 12 Sep 2012 17:28:16 +0000 Subject: Fix module loading in static build. Even when suil itself is built statically, the modules are not, so using SUIL_API for the module entry point (suil_wrapper_new) in this case was not setting dllexport. git-svn-id: http://svn.drobilla.net/lad/trunk/suil@4772 a436a847-0d15-0410-975c-d299462d15a1 --- suil/suil.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'suil') diff --git a/suil/suil.h b/suil/suil.h index b9adbef..310d6ab 100644 --- a/suil/suil.h +++ b/suil/suil.h @@ -25,14 +25,15 @@ #include "lv2/lv2plug.in/ns/lv2core/lv2.h" +#ifdef _WIN32 +# define SUIL_LIB_IMPORT __declspec(dllimport) +# define SUIL_LIB_EXPORT __declspec(dllexport) +#else +# define SUIL_LIB_IMPORT __attribute__((visibility("default"))) +# define SUIL_LIB_EXPORT __attribute__((visibility("default"))) +#endif + #ifdef SUIL_SHARED -# ifdef _WIN32 -# define SUIL_LIB_IMPORT __declspec(dllimport) -# define SUIL_LIB_EXPORT __declspec(dllexport) -# else -# define SUIL_LIB_IMPORT __attribute__((visibility("default"))) -# define SUIL_LIB_EXPORT __attribute__((visibility("default"))) -# endif # ifdef SUIL_INTERNAL # define SUIL_API SUIL_LIB_EXPORT # else -- cgit v1.2.1