summaryrefslogtreecommitdiffstats
path: root/include/ingen/Module.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/ingen/Module.hpp')
-rw-r--r--include/ingen/Module.hpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/ingen/Module.hpp b/include/ingen/Module.hpp
index b540fe7d..90f2f930 100644
--- a/include/ingen/Module.hpp
+++ b/include/ingen/Module.hpp
@@ -31,9 +31,11 @@ class World;
* All components of Ingen reside in one of these.
* @ingroup IngenShared
*/
-class INGEN_API Module {
+class INGEN_API Module
+{
public:
- Module() : library(nullptr) {}
+ Module() noexcept : library(nullptr) {}
+
virtual ~Module() = default;
Module(const Module&) = delete;
@@ -55,8 +57,14 @@ public:
extern "C" {
+#ifdef _WIN32
+# define INGEN_MODULE_EXPORT __declspec(dllexport)
+#else
+# define INGEN_MODULE_EXPORT __attribute__((visibility("default")))
+#endif
+
/** Prototype for the ingen_module_load() entry point in an ingen module. */
-INGEN_API ingen::Module* ingen_module_load();
+INGEN_MODULE_EXPORT ingen::Module* ingen_module_load();
}