summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-03-02 17:14:31 +0000
committerDavid Robillard <d@drobilla.net>2015-03-02 17:14:31 +0000
commite5da085b75ff7c33a10ac2b03434d487c47340f2 (patch)
treec59e52d7442dd735ec48dd0fc2d11e6838a15d6a
parentf69c75e637cc3c789a675d1811a2f632732bafc0 (diff)
downloadingen-e5da085b75ff7c33a10ac2b03434d487c47340f2.tar.gz
ingen-e5da085b75ff7c33a10ac2b03434d487c47340f2.tar.bz2
ingen-e5da085b75ff7c33a10ac2b03434d487c47340f2.zip
Fix compilation with -fvisibility=hidden.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5611 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--ingen/Arc.hpp3
-rw-r--r--ingen/Atom.hpp3
-rw-r--r--ingen/AtomReader.hpp3
-rw-r--r--ingen/AtomSink.hpp3
-rw-r--r--ingen/AtomWriter.hpp3
-rw-r--r--ingen/ClashAvoider.hpp3
-rw-r--r--ingen/Configuration.hpp3
-rw-r--r--ingen/EngineBase.hpp4
-rw-r--r--ingen/Forge.hpp3
-rw-r--r--ingen/Interface.hpp3
-rw-r--r--ingen/LV2Features.hpp6
-rw-r--r--ingen/Log.hpp3
-rw-r--r--ingen/Module.hpp7
-rw-r--r--ingen/Node.hpp3
-rw-r--r--ingen/Parser.hpp3
-rw-r--r--ingen/Plugin.hpp2
-rw-r--r--ingen/Resource.hpp2
-rw-r--r--ingen/Serialiser.hpp7
-rw-r--r--ingen/SocketReader.hpp3
-rw-r--r--ingen/SocketWriter.hpp4
-rw-r--r--ingen/Store.hpp12
-rw-r--r--ingen/URIMap.hpp3
-rw-r--r--ingen/URIs.hpp3
-rw-r--r--ingen/World.hpp3
-rw-r--r--ingen/client/ArcModel.hpp3
-rw-r--r--ingen/client/BlockModel.hpp3
-rw-r--r--ingen/client/ClientStore.hpp7
-rw-r--r--ingen/client/GraphModel.hpp3
-rw-r--r--ingen/client/ObjectModel.hpp3
-rw-r--r--ingen/client/PluginModel.hpp3
-rw-r--r--ingen/client/PluginUI.hpp8
-rw-r--r--ingen/client/PortModel.hpp7
-rw-r--r--ingen/client/SigClientInterface.hpp5
-rw-r--r--ingen/client/SocketClient.hpp3
-rw-r--r--ingen/client/ThreadedSigClientInterface.hpp3
-rw-r--r--ingen/ingen.h17
-rw-r--r--ingen/runtime_paths.hpp12
-rw-r--r--src/World.cpp2
-rw-r--r--src/gui/App.hpp3
-rw-r--r--src/gui/GraphBox.hpp3
-rw-r--r--src/server/Buffer.hpp3
-rw-r--r--src/server/BufferFactory.hpp3
-rw-r--r--src/server/BufferRef.hpp6
-rw-r--r--src/server/Engine.hpp3
-rw-r--r--src/server/PostProcessor.hpp4
-rw-r--r--src/server/ThreadManager.hpp3
-rw-r--r--wscript1
47 files changed, 127 insertions, 73 deletions
diff --git a/ingen/Arc.hpp b/ingen/Arc.hpp
index 69c65586..03d7d9f8 100644
--- a/ingen/Arc.hpp
+++ b/ingen/Arc.hpp
@@ -17,6 +17,7 @@
#ifndef INGEN_ARC_HPP
#define INGEN_ARC_HPP
+#include "ingen/ingen.h"
#include "raul/Deletable.hpp"
namespace Raul { class Path; }
@@ -27,7 +28,7 @@ namespace Ingen {
*
* @ingroup Ingen
*/
-class Arc : public Raul::Deletable
+class INGEN_API Arc : public Raul::Deletable
{
public:
virtual const Raul::Path& tail_path() const = 0;
diff --git a/ingen/Atom.hpp b/ingen/Atom.hpp
index 2e585a47..4275ce23 100644
--- a/ingen/Atom.hpp
+++ b/ingen/Atom.hpp
@@ -22,6 +22,7 @@
#include <cstring>
#include <string>
+#include "ingen/ingen.h"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "lv2/lv2plug.in/ns/ext/urid/urid.h"
@@ -41,7 +42,7 @@ class Forge;
In either case, the data is stored in a binary compatible format to LV2_Atom
(i.e., if the value is dynamically allocated, the header is repeated there).
*/
-class Atom {
+class INGEN_API Atom {
public:
Atom() { _atom.size = 0; _atom.type = 0; _body.ptr = NULL; }
~Atom() { dealloc(); }
diff --git a/ingen/AtomReader.hpp b/ingen/AtomReader.hpp
index b4c4418a..516ac983 100644
--- a/ingen/AtomReader.hpp
+++ b/ingen/AtomReader.hpp
@@ -22,6 +22,7 @@
#include "ingen/Interface.hpp"
#include "ingen/AtomSink.hpp"
#include "ingen/URIs.hpp"
+#include "ingen/ingen.h"
#include "serd/serd.h"
namespace Ingen {
@@ -34,7 +35,7 @@ class URIMap;
/** An AtomSink that calls methods on an Interface.
* @ingroup IngenShared
*/
-class AtomReader : public AtomSink
+class INGEN_API AtomReader : public AtomSink
{
public:
AtomReader(URIMap& map,
diff --git a/ingen/AtomSink.hpp b/ingen/AtomSink.hpp
index ade5e147..601892f6 100644
--- a/ingen/AtomSink.hpp
+++ b/ingen/AtomSink.hpp
@@ -17,6 +17,7 @@
#ifndef INGEN_ATOMSINK_HPP
#define INGEN_ATOMSINK_HPP
+#include "ingen/ingen.h"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
namespace Ingen {
@@ -24,7 +25,7 @@ namespace Ingen {
/** A sink for LV2 Atoms.
* @ingroup IngenShared
*/
-class AtomSink {
+class INGEN_API AtomSink {
public:
virtual ~AtomSink() {}
diff --git a/ingen/AtomWriter.hpp b/ingen/AtomWriter.hpp
index 4f10cd45..57abc376 100644
--- a/ingen/AtomWriter.hpp
+++ b/ingen/AtomWriter.hpp
@@ -21,6 +21,7 @@
#include "ingen/Interface.hpp"
#include "ingen/URIs.hpp"
+#include "ingen/ingen.h"
#include "lv2/lv2plug.in/ns/ext/atom/forge.h"
#include "serd/serd.h"
@@ -30,7 +31,7 @@ class AtomSink;
class URIMap;
/** An Interface that writes LV2 atoms to an AtomSink. */
-class AtomWriter : public Interface
+class INGEN_API AtomWriter : public Interface
{
public:
AtomWriter(URIMap& map, URIs& uris, AtomSink& sink);
diff --git a/ingen/ClashAvoider.hpp b/ingen/ClashAvoider.hpp
index c07273f0..5a92870d 100644
--- a/ingen/ClashAvoider.hpp
+++ b/ingen/ClashAvoider.hpp
@@ -21,6 +21,7 @@
#include <map>
+#include "ingen/ingen.h"
#include "raul/Path.hpp"
#include "raul/URI.hpp"
@@ -32,7 +33,7 @@ class Store;
*
* @ingroup ingen
*/
-class ClashAvoider
+class INGEN_API ClashAvoider
{
public:
ClashAvoider(const Store& store);
diff --git a/ingen/Configuration.hpp b/ingen/Configuration.hpp
index 50543986..e18ce7e5 100644
--- a/ingen/Configuration.hpp
+++ b/ingen/Configuration.hpp
@@ -28,6 +28,7 @@
#include "ingen/Atom.hpp"
#include "ingen/Forge.hpp"
#include "ingen/URIMap.hpp"
+#include "ingen/ingen.h"
#include "raul/Exception.hpp"
namespace Ingen {
@@ -35,7 +36,7 @@ namespace Ingen {
/** Ingen configuration (command line options and/or configuration file).
* @ingroup IngenShared
*/
-class Configuration {
+class INGEN_API Configuration {
public:
explicit Configuration(Forge& forge);
diff --git a/ingen/EngineBase.hpp b/ingen/EngineBase.hpp
index 177e8b20..be55c3a8 100644
--- a/ingen/EngineBase.hpp
+++ b/ingen/EngineBase.hpp
@@ -20,7 +20,7 @@
#include <stdint.h>
#include "raul/URI.hpp"
-
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
namespace Ingen {
@@ -32,7 +32,7 @@ class Interface;
@ingroup Ingen
*/
-class EngineBase
+class INGEN_API EngineBase
{
public:
virtual ~EngineBase() {}
diff --git a/ingen/Forge.hpp b/ingen/Forge.hpp
index de32b3e8..e57d0b22 100644
--- a/ingen/Forge.hpp
+++ b/ingen/Forge.hpp
@@ -20,6 +20,7 @@
#include <string>
#include "ingen/Atom.hpp"
+#include "ingen/ingen.h"
#include "lv2/lv2plug.in/ns/ext/atom/forge.h"
namespace Ingen {
@@ -29,7 +30,7 @@ class URIMap;
/** Forge for Atoms.
* @ingroup IngenShared
*/
-class Forge : public LV2_Atom_Forge {
+class INGEN_API Forge : public LV2_Atom_Forge {
public:
explicit Forge(URIMap& map);
diff --git a/ingen/Interface.hpp b/ingen/Interface.hpp
index 042bd3f7..7d13b725 100644
--- a/ingen/Interface.hpp
+++ b/ingen/Interface.hpp
@@ -26,6 +26,7 @@
#include "ingen/Resource.hpp"
#include "ingen/Status.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
namespace Raul {
@@ -41,7 +42,7 @@ namespace Ingen {
*
* @ingroup Ingen
*/
-class Interface
+class INGEN_API Interface
{
public:
virtual ~Interface() {}
diff --git a/ingen/LV2Features.hpp b/ingen/LV2Features.hpp
index 61180636..23a302ed 100644
--- a/ingen/LV2Features.hpp
+++ b/ingen/LV2Features.hpp
@@ -20,11 +20,11 @@
#include <string>
#include <vector>
+#include "ingen/ingen.h"
+#include "ingen/types.hpp"
#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
#include "raul/Noncopyable.hpp"
-#include "ingen/types.hpp"
-
namespace Ingen {
class Node;
@@ -33,7 +33,7 @@ class World;
/** Features for use by LV2 plugins.
* @ingroup IngenShared
*/
-class LV2Features {
+class INGEN_API LV2Features {
public:
LV2Features();
diff --git a/ingen/Log.hpp b/ingen/Log.hpp
index 3574ae3e..1db1ac6b 100644
--- a/ingen/Log.hpp
+++ b/ingen/Log.hpp
@@ -21,6 +21,7 @@
#include <boost/format.hpp>
+#include "ingen/ingen.h"
#include "lv2/lv2plug.in/ns/ext/log/log.h"
namespace Ingen {
@@ -29,7 +30,7 @@ typedef boost::basic_format<char> fmt;
class URIs;
-class Log {
+class INGEN_API Log {
public:
Log(LV2_Log_Log* log, URIs& uris);
diff --git a/ingen/Module.hpp b/ingen/Module.hpp
index cb3d90b2..3ec0d2a7 100644
--- a/ingen/Module.hpp
+++ b/ingen/Module.hpp
@@ -19,6 +19,8 @@
#include <glibmm/module.h>
+#include "ingen/ingen.h"
+
namespace Ingen {
class World;
@@ -28,7 +30,8 @@ class World;
* All components of Ingen reside in one of these.
* @ingroup IngenShared
*/
-struct Module {
+class INGEN_API Module {
+public:
Module() : library(NULL) {}
virtual ~Module() {}
@@ -53,7 +56,7 @@ private:
extern "C" {
/** Prototype for the ingen_module_load() entry point in an ingen module. */
-Ingen::Module* ingen_module_load();
+INGEN_API Ingen::Module* ingen_module_load();
}
diff --git a/ingen/Node.hpp b/ingen/Node.hpp
index 293ac058..b10f2d10 100644
--- a/ingen/Node.hpp
+++ b/ingen/Node.hpp
@@ -18,6 +18,7 @@
#define INGEN_NODE_HPP
#include "ingen/Resource.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
#include "raul/Path.hpp"
@@ -45,7 +46,7 @@ class Store;
*
* @ingroup Ingen
*/
-class Node : public Resource
+class INGEN_API Node : public Resource
{
public:
enum class GraphType {
diff --git a/ingen/Parser.hpp b/ingen/Parser.hpp
index b4977c90..f5045848 100644
--- a/ingen/Parser.hpp
+++ b/ingen/Parser.hpp
@@ -23,6 +23,7 @@
#include <boost/optional.hpp>
#include "ingen/Node.hpp"
+#include "ingen/ingen.h"
#include "raul/Path.hpp"
#include "raul/URI.hpp"
@@ -36,7 +37,7 @@ class World;
@ingroup Ingen
*/
-class Parser {
+class INGEN_API Parser {
public:
explicit Parser() {}
diff --git a/ingen/Plugin.hpp b/ingen/Plugin.hpp
index b69c17c4..9fd317e6 100644
--- a/ingen/Plugin.hpp
+++ b/ingen/Plugin.hpp
@@ -29,7 +29,7 @@ namespace Ingen {
/** A plugin which instantiates to a Block.
* @ingroup Ingen
*/
-class Plugin : public Resource
+class INGEN_API Plugin : public Resource
{
public:
Plugin(URIs& uris, const Raul::URI& uri)
diff --git a/ingen/Resource.hpp b/ingen/Resource.hpp
index 3490d88c..b3f50da5 100644
--- a/ingen/Resource.hpp
+++ b/ingen/Resource.hpp
@@ -31,7 +31,7 @@ namespace Ingen {
/** An object with a URI described by properties.
* @ingroup Ingen
*/
-class Resource : public Raul::Deletable
+class INGEN_API Resource : public Raul::Deletable
{
public:
Resource(URIs& uris, const Raul::URI& uri)
diff --git a/ingen/Serialiser.hpp b/ingen/Serialiser.hpp
index 8c82634a..444a5f5e 100644
--- a/ingen/Serialiser.hpp
+++ b/ingen/Serialiser.hpp
@@ -20,12 +20,11 @@
#include <stdexcept>
#include <string>
+#include "ingen/Node.hpp"
+#include "ingen/ingen.h"
#include "raul/Path.hpp"
-
#include "sord/sordmm.hpp"
-#include "ingen/Node.hpp"
-
namespace Ingen {
class Arc;
@@ -38,7 +37,7 @@ class World;
@ingroup Ingen
*/
-class Serialiser
+class INGEN_API Serialiser
{
public:
explicit Serialiser(World& world);
diff --git a/ingen/SocketReader.hpp b/ingen/SocketReader.hpp
index 12b3e88b..88d24994 100644
--- a/ingen/SocketReader.hpp
+++ b/ingen/SocketReader.hpp
@@ -19,6 +19,7 @@
#include <thread>
+#include "ingen/ingen.h"
#include "raul/Socket.hpp"
#include "sord/sord.h"
@@ -28,7 +29,7 @@ class Interface;
class World;
/** Calls Interface methods based on Turtle messages received via socket. */
-class SocketReader
+class INGEN_API SocketReader
{
public:
SocketReader(World& world,
diff --git a/ingen/SocketWriter.hpp b/ingen/SocketWriter.hpp
index d8858dd0..85264f30 100644
--- a/ingen/SocketWriter.hpp
+++ b/ingen/SocketWriter.hpp
@@ -23,7 +23,7 @@
#include "ingen/AtomWriter.hpp"
#include "ingen/Interface.hpp"
#include "ingen/types.hpp"
-#include "ingen/types.hpp"
+#include "ingen/ingen.h"
#include "raul/Socket.hpp"
#include "raul/URI.hpp"
#include "sratom/sratom.h"
@@ -32,7 +32,7 @@ namespace Ingen {
/** An Interface that writes Turtle messages to a socket.
*/
-class SocketWriter : public AtomWriter, public AtomSink
+class INGEN_API SocketWriter : public AtomWriter, public AtomSink
{
public:
SocketWriter(URIMap& map,
diff --git a/ingen/Store.hpp b/ingen/Store.hpp
index 77af3d66..4b886de0 100644
--- a/ingen/Store.hpp
+++ b/ingen/Store.hpp
@@ -20,20 +20,20 @@
#include <map>
#include <mutex>
-#include "raul/Deletable.hpp"
-#include "raul/Noncopyable.hpp"
-
#include "ingen/Node.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
+#include "raul/Deletable.hpp"
+#include "raul/Noncopyable.hpp"
namespace Ingen {
/** Store of objects in the graph hierarchy.
* @ingroup IngenShared
*/
-class Store : public Raul::Noncopyable
- , public Raul::Deletable
- , public std::map< const Raul::Path, SPtr<Node> > {
+class INGEN_API Store : public Raul::Noncopyable
+ , public Raul::Deletable
+ , public std::map< const Raul::Path, SPtr<Node> > {
public:
void add(Node* o);
diff --git a/ingen/URIMap.hpp b/ingen/URIMap.hpp
index a275fdff..d17c42e1 100644
--- a/ingen/URIMap.hpp
+++ b/ingen/URIMap.hpp
@@ -22,6 +22,7 @@
#include "ingen/LV2Features.hpp"
#include "ingen/Log.hpp"
+#include "ingen/ingen.h"
#include "lv2/lv2plug.in/ns/ext/urid/urid.h"
#include "raul/Noncopyable.hpp"
#include "raul/URI.hpp"
@@ -31,7 +32,7 @@ namespace Ingen {
/** URI to integer map and implementation of LV2 URID extension.
* @ingroup IngenShared
*/
-class URIMap : public Raul::Noncopyable {
+class INGEN_API URIMap : public Raul::Noncopyable {
public:
URIMap(Log& log, LV2_URID_Map* map, LV2_URID_Unmap* unmap);
virtual ~URIMap() {}
diff --git a/ingen/URIs.hpp b/ingen/URIs.hpp
index 2dc3f2f6..a2f949d2 100644
--- a/ingen/URIs.hpp
+++ b/ingen/URIs.hpp
@@ -19,6 +19,7 @@
#include "ingen/Atom.hpp"
#include "ingen/Forge.hpp"
+#include "ingen/ingen.h"
#include "lv2/lv2plug.in/ns/ext/urid/urid.h"
#include "raul/Noncopyable.hpp"
#include "raul/URI.hpp"
@@ -39,7 +40,7 @@ class URIMap;
*
* @ingroup ingen
*/
-class URIs : public Raul::Noncopyable {
+class INGEN_API URIs : public Raul::Noncopyable {
public:
URIs(Ingen::Forge& forge, URIMap* map);
diff --git a/ingen/World.hpp b/ingen/World.hpp
index d803a4a9..73349616 100644
--- a/ingen/World.hpp
+++ b/ingen/World.hpp
@@ -19,6 +19,7 @@
#include <string>
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
#include "lv2/lv2plug.in/ns/ext/log/log.h"
#include "lv2/lv2plug.in/ns/ext/urid/urid.h"
@@ -59,7 +60,7 @@ class URIs;
*
* @ingroup IngenShared
*/
-class World : public Raul::Noncopyable {
+class INGEN_API World : public Raul::Noncopyable {
public:
/** Construct a new Ingen world.
* @param argc Argument count (as in C main())
diff --git a/ingen/client/ArcModel.hpp b/ingen/client/ArcModel.hpp
index 4306be09..d3635fd0 100644
--- a/ingen/client/ArcModel.hpp
+++ b/ingen/client/ArcModel.hpp
@@ -24,6 +24,7 @@
#include "ingen/Arc.hpp"
#include "ingen/client/PortModel.hpp"
+#include "ingen/ingen.h"
namespace Ingen {
namespace Client {
@@ -34,7 +35,7 @@ class ClientStore;
*
* @ingroup IngenClient
*/
-class ArcModel : public Arc
+class INGEN_API ArcModel : public Arc
{
public:
SPtr<PortModel> tail() const { return _tail; }
diff --git a/ingen/client/BlockModel.hpp b/ingen/client/BlockModel.hpp
index 2a1a6f5d..32c09c54 100644
--- a/ingen/client/BlockModel.hpp
+++ b/ingen/client/BlockModel.hpp
@@ -25,6 +25,7 @@
#include "ingen/client/ObjectModel.hpp"
#include "ingen/client/PluginModel.hpp"
#include "ingen/client/PortModel.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
namespace Raul { class Path; }
@@ -42,7 +43,7 @@ class ClientStore;
*
* @ingroup IngenClient
*/
-class BlockModel : public ObjectModel
+class INGEN_API BlockModel : public ObjectModel
{
public:
BlockModel(const BlockModel& copy);
diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp
index 1871fca2..3510fcb9 100644
--- a/ingen/client/ClientStore.hpp
+++ b/ingen/client/ClientStore.hpp
@@ -24,6 +24,7 @@
#include "ingen/Interface.hpp"
#include "ingen/Store.hpp"
#include "ingen/client/signal.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
#include "raul/Path.hpp"
@@ -48,9 +49,9 @@ class SigClientInterface;
*
* @ingroup IngenClient
*/
-class ClientStore : public Store
- , public Interface
- , public INGEN_TRACKABLE {
+class INGEN_API ClientStore : public Store
+ , public Interface
+ , public INGEN_TRACKABLE {
public:
ClientStore(
URIs& uris,
diff --git a/ingen/client/GraphModel.hpp b/ingen/client/GraphModel.hpp
index 2b166fd3..84fec681 100644
--- a/ingen/client/GraphModel.hpp
+++ b/ingen/client/GraphModel.hpp
@@ -18,6 +18,7 @@
#define INGEN_CLIENT_GRAPHMODEL_HPP
#include "ingen/client/BlockModel.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
namespace Ingen {
@@ -30,7 +31,7 @@ class ClientStore;
*
* @ingroup IngenClient
*/
-class GraphModel : public BlockModel
+class INGEN_API GraphModel : public BlockModel
{
public:
/* WARNING: Copy constructor creates a shallow copy WRT connections */
diff --git a/ingen/client/ObjectModel.hpp b/ingen/client/ObjectModel.hpp
index 6c582812..d5697493 100644
--- a/ingen/client/ObjectModel.hpp
+++ b/ingen/client/ObjectModel.hpp
@@ -32,6 +32,7 @@
#include "ingen/Node.hpp"
#include "ingen/Resource.hpp"
#include "ingen/client/signal.hpp"
+#include "ingen/ingen.h"
namespace Ingen {
@@ -52,7 +53,7 @@ class ClientStore;
*
* @ingroup IngenClient
*/
-class ObjectModel : public Node
+class INGEN_API ObjectModel : public Node
{
public:
virtual ~ObjectModel();
diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp
index 79fae72d..767dbc70 100644
--- a/ingen/client/PluginModel.hpp
+++ b/ingen/client/PluginModel.hpp
@@ -26,6 +26,7 @@
#include "ingen/Resource.hpp"
#include "ingen/World.hpp"
#include "ingen/client/signal.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
#include "lilv/lilv.h"
#include "raul/Symbol.hpp"
@@ -45,7 +46,7 @@ class PluginUI;
*
* @ingroup IngenClient
*/
-class PluginModel : public Ingen::Plugin
+class INGEN_API PluginModel : public Ingen::Plugin
{
public:
PluginModel(URIs& uris,
diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp
index 63e1074d..83a810f3 100644
--- a/ingen/client/PluginUI.hpp
+++ b/ingen/client/PluginUI.hpp
@@ -19,14 +19,12 @@
#include <set>
+#include "ingen/LV2Features.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
-
#include "lilv/lilv.h"
-
#include "suil/suil.h"
-#include "ingen/LV2Features.hpp"
-
namespace Ingen {
class Interface;
@@ -40,7 +38,7 @@ class BlockModel;
*
* @ingroup IngenClient
*/
-class PluginUI {
+class INGEN_API PluginUI {
public:
~PluginUI();
diff --git a/ingen/client/PortModel.hpp b/ingen/client/PortModel.hpp
index 647aa922..5903e865 100644
--- a/ingen/client/PortModel.hpp
+++ b/ingen/client/PortModel.hpp
@@ -20,13 +20,12 @@
#include <cstdlib>
#include <string>
+#include "ingen/client/ObjectModel.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
-
#include "lv2/lv2plug.in/ns/ext/port-props/port-props.h"
#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
-#include "ingen/client/ObjectModel.hpp"
-
namespace Raul { class Path; }
namespace Ingen {
@@ -36,7 +35,7 @@ namespace Client {
*
* @ingroup IngenClient
*/
-class PortModel : public ObjectModel
+class INGEN_API PortModel : public ObjectModel
{
public:
enum class Direction { INPUT, OUTPUT };
diff --git a/ingen/client/SigClientInterface.hpp b/ingen/client/SigClientInterface.hpp
index 39fff895..35166a2e 100644
--- a/ingen/client/SigClientInterface.hpp
+++ b/ingen/client/SigClientInterface.hpp
@@ -25,6 +25,7 @@
#include "ingen/Interface.hpp"
#include "ingen/client/signal.hpp"
+#include "ingen/ingen.h"
namespace Ingen {
namespace Client {
@@ -39,8 +40,8 @@ namespace Client {
*
* @ingroup IngenClient
*/
-class SigClientInterface : public Ingen::Interface,
- public INGEN_TRACKABLE
+class INGEN_API SigClientInterface : public Ingen::Interface,
+ public INGEN_TRACKABLE
{
public:
SigClientInterface() {}
diff --git a/ingen/client/SocketClient.hpp b/ingen/client/SocketClient.hpp
index c8da1e80..e6ed6c6c 100644
--- a/ingen/client/SocketClient.hpp
+++ b/ingen/client/SocketClient.hpp
@@ -19,12 +19,13 @@
#include "ingen/SocketReader.hpp"
#include "ingen/SocketWriter.hpp"
+#include "ingen/ingen.h"
namespace Ingen {
namespace Client {
/** The client side of an Ingen socket connection. */
-class SocketClient : public SocketWriter
+class INGEN_API SocketClient : public SocketWriter
{
public:
SocketClient(World& world,
diff --git a/ingen/client/ThreadedSigClientInterface.hpp b/ingen/client/ThreadedSigClientInterface.hpp
index 0d5d5e57..a2e1c5da 100644
--- a/ingen/client/ThreadedSigClientInterface.hpp
+++ b/ingen/client/ThreadedSigClientInterface.hpp
@@ -28,6 +28,7 @@
#include "ingen/Atom.hpp"
#include "ingen/Interface.hpp"
#include "ingen/client/SigClientInterface.hpp"
+#include "ingen/ingen.h"
#include "raul/SRSWQueue.hpp"
/** Returns nothing and takes no parameters (because they have all been bound) */
@@ -48,7 +49,7 @@ namespace Client {
*
* @ingroup IngenClient
*/
-class ThreadedSigClientInterface : public SigClientInterface
+class INGEN_API ThreadedSigClientInterface : public SigClientInterface
{
public:
explicit ThreadedSigClientInterface(uint32_t queue_size)
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"
diff --git a/ingen/runtime_paths.hpp b/ingen/runtime_paths.hpp
index 3d36e55e..f9f7c35f 100644
--- a/ingen/runtime_paths.hpp
+++ b/ingen/runtime_paths.hpp
@@ -19,14 +19,16 @@
#include <string>
+#include "ingen/ingen.h"
+
namespace Ingen {
-void set_bundle_path(const char* path);
-void set_bundle_path_from_code(void* function);
+INGEN_API void set_bundle_path(const char* path);
+INGEN_API void set_bundle_path_from_code(void* function);
-std::string bundle_file_path(const std::string& name);
-std::string data_file_path(const std::string& name);
-std::string module_path(const std::string& name, std::string dir="");
+INGEN_API std::string bundle_file_path(const std::string& name);
+INGEN_API std::string data_file_path(const std::string& name);
+INGEN_API std::string module_path(const std::string& name, std::string dir="");
} // namespace Ingen
diff --git a/src/World.cpp b/src/World.cpp
index 615c761d..03496f34 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -279,7 +279,7 @@ World::load_module(const char* name)
}
}
- log().error(fmt("Failed to load module `%1%'\n") % name);
+ log().error(fmt("Failed to load module `%1%' (%2%)\n") % name % lib->get_last_error());
delete lib;
return false;
}
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index 0ce37ebd..0e3a4079 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -29,6 +29,7 @@
#include "ingen/Atom.hpp"
#include "ingen/Status.hpp"
#include "ingen/World.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
#include "raul/Deletable.hpp"
#include "raul/URI.hpp"
@@ -65,7 +66,7 @@ class WindowFactory;
/** Ingen Gtk Application.
* \ingroup GUI
*/
-class App
+class INGEN_API App
{
public:
~App();
diff --git a/src/gui/GraphBox.hpp b/src/gui/GraphBox.hpp
index aee4902c..8d884e01 100644
--- a/src/gui/GraphBox.hpp
+++ b/src/gui/GraphBox.hpp
@@ -28,6 +28,7 @@
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/statusbar.h>
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
#include "Window.hpp"
@@ -60,7 +61,7 @@ class SubgraphModule;
*
* \ingroup GUI
*/
-class GraphBox : public Gtk::VBox
+class INGEN_API GraphBox : public Gtk::VBox
{
public:
GraphBox(BaseObjectType* cobject,
diff --git a/src/server/Buffer.hpp b/src/server/Buffer.hpp
index cf36bc21..6dcf241b 100644
--- a/src/server/Buffer.hpp
+++ b/src/server/Buffer.hpp
@@ -23,6 +23,7 @@
#include <boost/utility.hpp>
#include "ingen/types.hpp"
+#include "ingen/ingen.h"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "lv2/lv2plug.in/ns/ext/urid/urid.h"
#include "raul/Deletable.hpp"
@@ -38,7 +39,7 @@ class Context;
class Engine;
class BufferFactory;
-class Buffer : public boost::noncopyable
+class INGEN_API Buffer : public boost::noncopyable
{
public:
Buffer(BufferFactory& bufs,
diff --git a/src/server/BufferFactory.hpp b/src/server/BufferFactory.hpp
index 662c8149..97a5ca51 100644
--- a/src/server/BufferFactory.hpp
+++ b/src/server/BufferFactory.hpp
@@ -24,6 +24,7 @@
#include "ingen/Atom.hpp"
#include "ingen/Forge.hpp"
#include "ingen/URIs.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
#include "raul/RingBuffer.hpp"
@@ -39,7 +40,7 @@ namespace Server {
class Engine;
-class BufferFactory {
+class INGEN_API BufferFactory {
public:
BufferFactory(Engine& engine, URIs& uris);
~BufferFactory();
diff --git a/src/server/BufferRef.hpp b/src/server/BufferRef.hpp
index 77e3c130..c25f8c7f 100644
--- a/src/server/BufferRef.hpp
+++ b/src/server/BufferRef.hpp
@@ -19,6 +19,8 @@
#include <boost/intrusive_ptr.hpp>
+#include "ingen/ingen.h"
+
namespace Ingen {
namespace Server {
@@ -27,8 +29,8 @@ class Buffer;
typedef boost::intrusive_ptr<Buffer> BufferRef;
// Defined in Buffer.cpp
-void intrusive_ptr_add_ref(Buffer* b);
-void intrusive_ptr_release(Buffer* b);
+INGEN_API void intrusive_ptr_add_ref(Buffer* b);
+INGEN_API void intrusive_ptr_release(Buffer* b);
} // namespace Server
} // namespace Ingen
diff --git a/src/server/Engine.hpp b/src/server/Engine.hpp
index 6c932e18..4a4d6a56 100644
--- a/src/server/Engine.hpp
+++ b/src/server/Engine.hpp
@@ -23,6 +23,7 @@
#include "ingen/EngineBase.hpp"
#include "ingen/Interface.hpp"
+#include "ingen/ingen.h"
#include "ingen/types.hpp"
#include "ProcessContext.hpp"
@@ -60,7 +61,7 @@ class Worker;
@ingroup engine
*/
-class Engine : public boost::noncopyable, public EngineBase
+class INGEN_API Engine : public boost::noncopyable, public EngineBase
{
public:
explicit Engine(Ingen::World* world);
diff --git a/src/server/PostProcessor.hpp b/src/server/PostProcessor.hpp
index f4301f46..8b7bda50 100644
--- a/src/server/PostProcessor.hpp
+++ b/src/server/PostProcessor.hpp
@@ -19,6 +19,8 @@
#include <atomic>
+#include "ingen/ingen.h"
+
#include "types.hpp"
namespace Ingen {
@@ -39,7 +41,7 @@ class ProcessContext;
*
* \ingroup engine
*/
-class PostProcessor
+class INGEN_API PostProcessor
{
public:
explicit PostProcessor(Engine& engine);
diff --git a/src/server/ThreadManager.hpp b/src/server/ThreadManager.hpp
index 1fb1ca58..a29f7f7f 100644
--- a/src/server/ThreadManager.hpp
+++ b/src/server/ThreadManager.hpp
@@ -19,6 +19,7 @@
#include <cassert>
+#include "ingen/ingen.h"
#include "raul/ThreadVar.hpp"
namespace Ingen {
@@ -31,7 +32,7 @@ enum ThreadFlag {
THREAD_MESSAGE = 1 << 3,
};
-class ThreadManager {
+class INGEN_API ThreadManager {
public:
static inline void set_flag(ThreadFlag f) {
#ifndef NDEBUG
diff --git a/wscript b/wscript
index 39894088..1fb5ed2d 100644
--- a/wscript
+++ b/wscript
@@ -132,6 +132,7 @@ def configure(conf):
conf.env.PTHREAD_CFLAGS = []
conf.env.PTHREAD_LINKFLAGS = []
+ autowaf.define(conf, 'INGEN_SHARED', 1);
autowaf.define(conf, 'INGEN_VERSION', INGEN_VERSION)
if not Options.options.no_client: