summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/pbd/pbd/abstract_ui.h1
-rw-r--r--libs/pbd/pbd/base_ui.h3
-rw-r--r--libs/pbd/pbd/basename.h4
-rw-r--r--libs/pbd/pbd/boost_debug.h8
-rw-r--r--libs/pbd/pbd/cartesian.h14
-rw-r--r--libs/pbd/pbd/clear_dir.h4
-rw-r--r--libs/pbd/pbd/command.h3
-rw-r--r--libs/pbd/pbd/compose.h34
-rw-r--r--libs/pbd/pbd/controllable.h5
-rw-r--r--libs/pbd/pbd/controllable_descriptor.h4
-rw-r--r--libs/pbd/pbd/convert.h29
-rw-r--r--libs/pbd/pbd/cpus.h4
-rw-r--r--libs/pbd/pbd/crossthread.h4
-rw-r--r--libs/pbd/pbd/debug.h26
-rw-r--r--libs/pbd/pbd/debug_rt_alloc.h8
-rw-r--r--libs/pbd/pbd/demangle.h4
-rw-r--r--libs/pbd/pbd/destructible.h3
-rw-r--r--libs/pbd/pbd/enumwriter.h6
-rw-r--r--libs/pbd/pbd/epa.h4
-rw-r--r--libs/pbd/pbd/error.h9
-rw-r--r--libs/pbd/pbd/event_loop.h4
-rw-r--r--libs/pbd/pbd/failed_constructor.h4
-rw-r--r--libs/pbd/pbd/fastlog.h10
-rw-r--r--libs/pbd/pbd/file_manager.h12
-rw-r--r--libs/pbd/pbd/floating.h6
-rw-r--r--libs/pbd/pbd/forkexec.h6
-rw-r--r--libs/pbd/pbd/fpu.h5
-rw-r--r--libs/pbd/pbd/functor_command.h3
-rw-r--r--libs/pbd/pbd/id.h7
-rw-r--r--libs/pbd/pbd/libpbd_visibility.h58
-rw-r--r--libs/pbd/pbd/locale_guard.h4
-rw-r--r--libs/pbd/pbd/malign.h4
-rw-r--r--libs/pbd/pbd/memento_command.h7
-rw-r--r--libs/pbd/pbd/mountpoint.h4
-rw-r--r--libs/pbd/pbd/openuri.h6
-rw-r--r--libs/pbd/pbd/pathexpand.h6
-rw-r--r--libs/pbd/pbd/pathscanner.h4
-rw-r--r--libs/pbd/pbd/pbd.h6
-rw-r--r--libs/pbd/pbd/pool.h13
-rw-r--r--libs/pbd/pbd/properties.h13
-rw-r--r--libs/pbd/pbd/property_basics.h11
-rw-r--r--libs/pbd/pbd/property_list.h5
-rw-r--r--libs/pbd/pbd/pthread_utils.h19
-rw-r--r--libs/pbd/pbd/rcu.h8
-rw-r--r--libs/pbd/pbd/receiver.h3
-rw-r--r--libs/pbd/pbd/replace_all.h4
-rw-r--r--libs/pbd/pbd/ringbuffer.h12
-rw-r--r--libs/pbd/pbd/ringbufferNPT.h12
-rw-r--r--libs/pbd/pbd/search_path.h4
-rw-r--r--libs/pbd/pbd/selectable.h8
-rw-r--r--libs/pbd/pbd/semaphore.h3
-rw-r--r--libs/pbd/pbd/semutils.h4
-rw-r--r--libs/pbd/pbd/sequence_property.h3
-rw-r--r--libs/pbd/pbd/shortpath.h4
-rw-r--r--libs/pbd/pbd/signals.h13
-rw-r--r--libs/pbd/pbd/sndfile_manager.h4
-rw-r--r--libs/pbd/pbd/stacktrace.h13
-rw-r--r--libs/pbd/pbd/stateful.h9
-rw-r--r--libs/pbd/pbd/stateful_diff_command.h8
-rw-r--r--libs/pbd/pbd/statefuldestructible.h3
-rw-r--r--libs/pbd/pbd/stl_delete.h11
-rw-r--r--libs/pbd/pbd/stl_functors.h16
-rw-r--r--libs/pbd/pbd/strsplit.h6
-rw-r--r--libs/pbd/pbd/textreceiver.h3
-rw-r--r--libs/pbd/pbd/thrown_error.h3
-rw-r--r--libs/pbd/pbd/tokenizer.h3
-rw-r--r--libs/pbd/pbd/touchable.h10
-rw-r--r--libs/pbd/pbd/transmitter.h6
-rw-r--r--libs/pbd/pbd/undo.h5
-rw-r--r--libs/pbd/pbd/unknown_type.h4
-rw-r--r--libs/pbd/pbd/unwind.h4
-rw-r--r--libs/pbd/pbd/uuid.h4
-rw-r--r--libs/pbd/pbd/uuid_boost.h4
-rw-r--r--libs/pbd/pbd/whitespace.h4
-rw-r--r--libs/pbd/pbd/xml++.h14
-rw-r--r--libs/pbd/wscript7
76 files changed, 400 insertions, 213 deletions
diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h
index fb09dee5c2..e78cf1ce28 100644
--- a/libs/pbd/pbd/abstract_ui.h
+++ b/libs/pbd/pbd/abstract_ui.h
@@ -26,6 +26,7 @@
#include <glibmm/threads.h>
+#include "pbd/libpbd_visibility.h"
#include "pbd/receiver.h"
#include "pbd/ringbufferNPT.h"
#include "pbd/signals.h"
diff --git a/libs/pbd/pbd/base_ui.h b/libs/pbd/pbd/base_ui.h
index 186a3c55a6..ee2bbf5ee9 100644
--- a/libs/pbd/pbd/base_ui.h
+++ b/libs/pbd/pbd/base_ui.h
@@ -29,6 +29,7 @@
#include <glibmm/threads.h>
#include <glibmm/main.h>
+#include "pbd/libpbd_visibility.h"
#include "pbd/crossthread.h"
#include "pbd/event_loop.h"
@@ -41,7 +42,7 @@
*/
-class BaseUI : public sigc::trackable, public PBD::EventLoop
+class LIBPBD_API BaseUI : public sigc::trackable, public PBD::EventLoop
{
public:
BaseUI (const std::string& name);
diff --git a/libs/pbd/pbd/basename.h b/libs/pbd/pbd/basename.h
index 43da3b39f6..16e7905748 100644
--- a/libs/pbd/pbd/basename.h
+++ b/libs/pbd/pbd/basename.h
@@ -22,8 +22,10 @@
#include <glibmm/ustring.h>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
- Glib::ustring basename_nosuffix (Glib::ustring);
+ LIBPBD_API Glib::ustring basename_nosuffix (Glib::ustring);
}
#endif /* __libpbd_basename_h__ */
diff --git a/libs/pbd/pbd/boost_debug.h b/libs/pbd/pbd/boost_debug.h
index 6a0e4970fd..294a3468f6 100644
--- a/libs/pbd/pbd/boost_debug.h
+++ b/libs/pbd/pbd/boost_debug.h
@@ -23,8 +23,10 @@
#include <ostream>
-void boost_debug_shared_ptr_mark_interesting (void* ptr, const char* type);
-void boost_debug_list_ptrs ();
-void boost_debug_shared_ptr_show_live_debugging (bool yn);
+#include "pbd/libpbd_visibility.h"
+
+LIBPBD_API void boost_debug_shared_ptr_mark_interesting (void* ptr, const char* type);
+LIBPBD_API void boost_debug_list_ptrs ();
+LIBPBD_API void boost_debug_shared_ptr_show_live_debugging (bool yn);
#endif /* __pbd_boost_debug_h__ */
diff --git a/libs/pbd/pbd/cartesian.h b/libs/pbd/pbd/cartesian.h
index ffc91c2fd6..20c8b27088 100644
--- a/libs/pbd/pbd/cartesian.h
+++ b/libs/pbd/pbd/cartesian.h
@@ -22,14 +22,16 @@
#include <cfloat>
#include <cmath>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-void spherical_to_cartesian (double azi, double ele, double len, double& x, double& y, double& z);
-void cartesian_to_spherical (double x, double y, double z, double& azi, double& ele, double& len);
+LIBPBD_API void spherical_to_cartesian (double azi, double ele, double len, double& x, double& y, double& z);
+LIBPBD_API void cartesian_to_spherical (double x, double y, double z, double& azi, double& ele, double& len);
struct AngularVector;
-struct CartesianVector {
+struct LIBPBD_API CartesianVector {
double x;
double y;
double z;
@@ -51,10 +53,10 @@ struct CartesianVector {
return other;
}
- void angular (AngularVector&) const;
+ inline void angular (AngularVector& a) const;
};
-struct AngularVector {
+struct LIBPBD_API AngularVector {
double azi;
double ele;
double length;
@@ -95,7 +97,7 @@ struct AngularVector {
}
};
-inline void CartesianVector::angular (AngularVector& a) const {
+LIBPBD_API inline void CartesianVector::angular (AngularVector& a) const {
cartesian_to_spherical (x, y, z, a.azi, a.ele, a.length);
}
diff --git a/libs/pbd/pbd/clear_dir.h b/libs/pbd/pbd/clear_dir.h
index 9c128d994d..c0fb49d41d 100644
--- a/libs/pbd/pbd/clear_dir.h
+++ b/libs/pbd/pbd/clear_dir.h
@@ -24,8 +24,10 @@
#include <vector>
#include <sys/types.h>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
- int clear_directory (const std::string&, size_t* = 0, std::vector<std::string>* = 0);
+ LIBPBD_API int clear_directory (const std::string&, size_t* = 0, std::vector<std::string>* = 0);
}
#endif /* __pbd_clear_dir_h__ */
diff --git a/libs/pbd/pbd/command.h b/libs/pbd/pbd/command.h
index db4d2bbd81..4547b779fb 100644
--- a/libs/pbd/pbd/command.h
+++ b/libs/pbd/pbd/command.h
@@ -24,10 +24,11 @@
#include <string>
+#include "pbd/libpbd_visibility.h"
#include "pbd/signals.h"
#include "pbd/statefuldestructible.h"
-class Command : public PBD::StatefulDestructible, public PBD::ScopedConnectionList
+class LIBPBD_API Command : public PBD::StatefulDestructible, public PBD::ScopedConnectionList
{
public:
virtual ~Command() { /* NOTE: derived classes must call drop_references() */ }
diff --git a/libs/pbd/pbd/compose.h b/libs/pbd/pbd/compose.h
index 0df9519aaf..a80cb213b2 100644
--- a/libs/pbd/pbd/compose.h
+++ b/libs/pbd/pbd/compose.h
@@ -38,11 +38,13 @@
#include <list>
#include <map> // for multimap
+#include "pbd/libpbd_visibility.h"
+
namespace StringPrivate
{
// the actual composition class - using string::compose is cleaner, so we
// hide it here
- class Composition
+ class LIBPBD_API Composition
{
public:
// initialize and prepare format string on the form "text %1 text %2 etc."
@@ -202,7 +204,7 @@ namespace StringPrivate
// a series of functions which accept a format string on the form "text %1
// more %2 less %3" and a number of templated parameters and spits out the
// composited string
- template <typename T1>
+ template <typename T1> LIBPBD_API
inline std::string string_compose(const std::string &fmt, const T1 &o1)
{
StringPrivate::Composition c(fmt);
@@ -210,7 +212,7 @@ namespace StringPrivate
return c.str();
}
- template <typename T1, typename T2>
+ template <typename T1, typename T2> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2)
{
@@ -219,7 +221,7 @@ namespace StringPrivate
return c.str();
}
- template <typename T1, typename T2, typename T3>
+ template <typename T1, typename T2, typename T3> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3)
{
@@ -228,7 +230,7 @@ namespace StringPrivate
return c.str();
}
- template <typename T1, typename T2, typename T3, typename T4>
+ template <typename T1, typename T2, typename T3, typename T4> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4)
@@ -238,7 +240,7 @@ namespace StringPrivate
return c.str();
}
- template <typename T1, typename T2, typename T3, typename T4, typename T5>
+ template <typename T1, typename T2, typename T3, typename T4, typename T5> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5)
@@ -249,7 +251,7 @@ namespace StringPrivate
}
template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6>
+ typename T6> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6)
@@ -260,7 +262,7 @@ namespace StringPrivate
}
template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7>
+ typename T6, typename T7> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
@@ -272,7 +274,7 @@ namespace StringPrivate
}
template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8>
+ typename T6, typename T7, typename T8> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
@@ -284,7 +286,7 @@ namespace StringPrivate
}
template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9>
+ typename T6, typename T7, typename T8, typename T9> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
@@ -296,7 +298,7 @@ namespace StringPrivate
}
template <typename T1, typename T2, typename T3, typename T4, typename T5,
- typename T6, typename T7, typename T8, typename T9, typename T10>
+ typename T6, typename T7, typename T8, typename T9, typename T10> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
@@ -311,7 +313,7 @@ namespace StringPrivate
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11>
+ typename T11> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
@@ -326,7 +328,7 @@ namespace StringPrivate
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12>
+ typename T11, typename T12> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
@@ -341,7 +343,7 @@ namespace StringPrivate
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13>
+ typename T11, typename T12, typename T13> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
@@ -357,7 +359,7 @@ namespace StringPrivate
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10,
- typename T11, typename T12, typename T13, typename T14>
+ typename T11, typename T12, typename T13, typename T14> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
@@ -374,7 +376,7 @@ namespace StringPrivate
template <typename T1, typename T2, typename T3, typename T4, typename T5,
typename T6, typename T7, typename T8, typename T9, typename T10,
typename T11, typename T12, typename T13, typename T14,
- typename T15>
+ typename T15> LIBPBD_API
inline std::string string_compose(const std::string &fmt,
const T1 &o1, const T2 &o2, const T3 &o3,
const T4 &o4, const T5 &o5, const T6 &o6,
diff --git a/libs/pbd/pbd/controllable.h b/libs/pbd/pbd/controllable.h
index d9cd21d28d..eb4b7ff142 100644
--- a/libs/pbd/pbd/controllable.h
+++ b/libs/pbd/pbd/controllable.h
@@ -24,6 +24,7 @@
#include <set>
#include <map>
+#include "pbd/libpbd_visibility.h"
#include "pbd/signals.h"
#include <glibmm/threads.h>
@@ -33,7 +34,7 @@ class XMLNode;
namespace PBD {
-class Controllable : public PBD::StatefulDestructible {
+class LIBPBD_API Controllable : public PBD::StatefulDestructible {
public:
enum Flag {
Toggle = 0x1,
@@ -113,7 +114,7 @@ class Controllable : public PBD::StatefulDestructible {
a Controllable
*/
-class IgnorableControllable : public Controllable
+class LIBPBD_API IgnorableControllable : public Controllable
{
public:
IgnorableControllable () : PBD::Controllable ("ignoreMe") {}
diff --git a/libs/pbd/pbd/controllable_descriptor.h b/libs/pbd/pbd/controllable_descriptor.h
index 6b0d733656..b234dbd293 100644
--- a/libs/pbd/pbd/controllable_descriptor.h
+++ b/libs/pbd/pbd/controllable_descriptor.h
@@ -23,9 +23,11 @@
#include <string>
#include <stdint.h>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-class ControllableDescriptor {
+class LIBPBD_API ControllableDescriptor {
public:
enum TopLevelType {
RemoteControlID,
diff --git a/libs/pbd/pbd/convert.h b/libs/pbd/pbd/convert.h
index fec0248157..1269254906 100644
--- a/libs/pbd/pbd/convert.h
+++ b/libs/pbd/pbd/convert.h
@@ -27,25 +27,27 @@
#include <iostream>
#include <glibmm/ustring.h>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-std::string short_version (std::string, std::string::size_type target_length);
+LIBPBD_API std::string short_version (std::string, std::string::size_type target_length);
-int atoi (const std::string&);
-int32_t atol (const std::string&);
-int64_t atoll (const std::string&);
-double atof (const std::string&);
-std::string url_decode (std::string const &);
+LIBPBD_API int atoi (const std::string&);
+LIBPBD_API int32_t atol (const std::string&);
+LIBPBD_API int64_t atoll (const std::string&);
+LIBPBD_API double atof (const std::string&);
+LIBPBD_API std::string url_decode (std::string const &);
-std::string capitalize (const std::string&);
+LIBPBD_API std::string capitalize (const std::string&);
// std::string length2string (const int32_t frames, const float sample_rate);
-std::string length2string (const int64_t frames, const double sample_rate);
+LIBPBD_API std::string length2string (const int64_t frames, const double sample_rate);
-std::vector<std::string> internationalize (const char *, const char **);
-bool strings_equal_ignore_case (const std::string& a, const std::string& b);
+LIBPBD_API std::vector<std::string> internationalize (const char *, const char **);
+LIBPBD_API bool strings_equal_ignore_case (const std::string& a, const std::string& b);
-template <class T> std::string
+template <class T> std::string LIBPBD_API
to_string (T t, std::ios_base & (*f)(std::ios_base&))
{
std::ostringstream oss;
@@ -53,10 +55,9 @@ to_string (T t, std::ios_base & (*f)(std::ios_base&))
return oss.str();
}
-bool string_is_affirmative (const std::string&);
+LIBPBD_API bool string_is_affirmative (const std::string&);
-const char *
-sgettext (const char *, const char *);
+LIBPBD_API const char* sgettext (const char *, const char *);
} //namespace PBD
diff --git a/libs/pbd/pbd/cpus.h b/libs/pbd/pbd/cpus.h
index 1488f30068..c71567ddac 100644
--- a/libs/pbd/pbd/cpus.h
+++ b/libs/pbd/pbd/cpus.h
@@ -23,6 +23,8 @@
#include <stdint.h>
-extern uint32_t hardware_concurrency ();
+#include "pbd/libpbd_visibility.h"
+
+LIBPBD_API extern uint32_t hardware_concurrency ();
#endif /* __libpbd_cpus_h__ */
diff --git a/libs/pbd/pbd/crossthread.h b/libs/pbd/pbd/crossthread.h
index 13ab37d38d..d172c9c60f 100644
--- a/libs/pbd/pbd/crossthread.h
+++ b/libs/pbd/pbd/crossthread.h
@@ -26,6 +26,8 @@
#include <glibmm/main.h>
+#include "pbd/libpbd_visibility.h"
+
/** A simple abstraction of a mechanism of signalling one thread from another.
* The signaller calls ::wakeup() to tell the signalled thread to check for
* work to be done.
@@ -35,7 +37,7 @@
* in Glib main loop based situations.
*/
-class CrossThreadChannel {
+class LIBPBD_API CrossThreadChannel {
public:
/** if @a non_blocking is true, the channel will not cause blocking
* when used in an event loop based on poll/select or the glib main
diff --git a/libs/pbd/pbd/debug.h b/libs/pbd/pbd/debug.h
index 989cd42dd1..dc7e1ce906 100644
--- a/libs/pbd/pbd/debug.h
+++ b/libs/pbd/pbd/debug.h
@@ -24,25 +24,27 @@
#include <sstream>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
- extern uint64_t debug_bits;
- uint64_t new_debug_bit (const char* name);
- void debug_print (const char* prefix, std::string str);
- void set_debug_bits (uint64_t bits);
- int parse_debug_options (const char* str);
- void list_debug_options ();
+ LIBPBD_API extern uint64_t debug_bits;
+ LIBPBD_API uint64_t new_debug_bit (const char* name);
+ LIBPBD_API void debug_print (const char* prefix, std::string str);
+ LIBPBD_API void set_debug_bits (uint64_t bits);
+ LIBPBD_API int parse_debug_options (const char* str);
+ LIBPBD_API void list_debug_options ();
namespace DEBUG {
/* this namespace is so that we can write DEBUG::bit_name */
- extern uint64_t Stateful;
- extern uint64_t Properties;
- extern uint64_t FileManager;
- extern uint64_t Pool;
- extern uint64_t EventLoop;
- extern uint64_t AbstractUI;
+ LIBPBD_API extern uint64_t Stateful;
+ LIBPBD_API extern uint64_t Properties;
+ LIBPBD_API extern uint64_t FileManager;
+ LIBPBD_API extern uint64_t Pool;
+ LIBPBD_API extern uint64_t EventLoop;
+ LIBPBD_API extern uint64_t AbstractUI;
}
}
diff --git a/libs/pbd/pbd/debug_rt_alloc.h b/libs/pbd/pbd/debug_rt_alloc.h
index 2bbea90278..0d1b4bd47c 100644
--- a/libs/pbd/pbd/debug_rt_alloc.h
+++ b/libs/pbd/pbd/debug_rt_alloc.h
@@ -22,18 +22,20 @@
#ifndef __pbd_debug_rt_alloc_h__
#define __pbd_debug_rt_alloc_h__
+#include "pbd/libpbd_visibility.h"
+
extern "C" {
/** Should be set to point to a function which returns non-0 if a malloc is
* allowed in the current situation, or 0 if not.
*/
-extern int (*pbd_alloc_allowed) ();
+LIBPBD_API extern int (*pbd_alloc_allowed) ();
/** Call this to suspend malloc checking until a call to resume_rt_malloc_checks */
-extern void suspend_rt_malloc_checks ();
+LIBPBD_API extern void suspend_rt_malloc_checks ();
/** Resume malloc checking after a suspension */
-extern void resume_rt_malloc_checks ();
+LIBPBD_API extern void resume_rt_malloc_checks ();
}
diff --git a/libs/pbd/pbd/demangle.h b/libs/pbd/pbd/demangle.h
index aecd966f47..c9f5c194c0 100644
--- a/libs/pbd/pbd/demangle.h
+++ b/libs/pbd/pbd/demangle.h
@@ -28,9 +28,11 @@
#include <cxxabi.h>
#endif
+#include "pbd/libpbd_visibility.h"
+
namespace PBD
{
- template<typename T>
+ template<typename T> LIBPBD_API
std::string demangled_name (T const & obj)
{
#ifdef __GNUC__
diff --git a/libs/pbd/pbd/destructible.h b/libs/pbd/pbd/destructible.h
index 8881b45c55..78f6f83b7a 100644
--- a/libs/pbd/pbd/destructible.h
+++ b/libs/pbd/pbd/destructible.h
@@ -21,10 +21,11 @@
#define __pbd_destructible_h__
#include "pbd/signals.h"
+#include "pbd/libpbd_visibility.h"
namespace PBD {
-class Destructible {
+class LIBPBD_API Destructible {
public:
Destructible() {}
virtual ~Destructible () { Destroyed(); }
diff --git a/libs/pbd/pbd/enumwriter.h b/libs/pbd/pbd/enumwriter.h
index 95f1ea9e9f..634767e7f2 100644
--- a/libs/pbd/pbd/enumwriter.h
+++ b/libs/pbd/pbd/enumwriter.h
@@ -27,9 +27,11 @@
#include <exception>
#include <sstream>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-class unknown_enumeration : public std::exception {
+class LIBPBD_API unknown_enumeration : public std::exception {
public:
unknown_enumeration (std::string const & e) throw() {
std::stringstream s;
@@ -47,7 +49,7 @@ private:
std::string _message;
};
-class EnumWriter {
+class LIBPBD_API EnumWriter {
public:
static EnumWriter& instance();
static void destroy();
diff --git a/libs/pbd/pbd/epa.h b/libs/pbd/pbd/epa.h
index 477d7f9678..6d305c5c4c 100644
--- a/libs/pbd/pbd/epa.h
+++ b/libs/pbd/pbd/epa.h
@@ -23,9 +23,11 @@
#include <map>
#include <string>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-class EnvironmentalProtectionAgency {
+class LIBPBD_API EnvironmentalProtectionAgency {
public:
EnvironmentalProtectionAgency (bool arm = true, const std::string& envname = std::string());
~EnvironmentalProtectionAgency ();
diff --git a/libs/pbd/pbd/error.h b/libs/pbd/pbd/error.h
index 58842d68eb..eff88fbf10 100644
--- a/libs/pbd/pbd/error.h
+++ b/libs/pbd/pbd/error.h
@@ -19,13 +19,14 @@
#ifndef __libpbd_error_h__
#define __libpbd_error_h__
+#include "pbd/libpbd_visibility.h"
#include "transmitter.h"
namespace PBD {
- extern Transmitter error;
- extern Transmitter info;
- extern Transmitter warning;
- extern Transmitter fatal;
+ LIBPBD_API extern Transmitter error;
+ LIBPBD_API extern Transmitter info;
+ LIBPBD_API extern Transmitter warning;
+ LIBPBD_API extern Transmitter fatal;
}
#endif // __libpbd_error_h__
diff --git a/libs/pbd/pbd/event_loop.h b/libs/pbd/pbd/event_loop.h
index b5ee9b8000..5baa5e04be 100644
--- a/libs/pbd/pbd/event_loop.h
+++ b/libs/pbd/pbd/event_loop.h
@@ -24,6 +24,8 @@
#include <boost/bind.hpp> /* we don't need this here, but anything calling call_slot() probably will, so this is convenient */
#include <glibmm/threads.h>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD
{
@@ -36,7 +38,7 @@ namespace PBD
* when something like this is needed (it inherits from EventLoop).
*/
-class EventLoop
+class LIBPBD_API EventLoop
{
public:
EventLoop() {}
diff --git a/libs/pbd/pbd/failed_constructor.h b/libs/pbd/pbd/failed_constructor.h
index b13964e355..92c3f19c76 100644
--- a/libs/pbd/pbd/failed_constructor.h
+++ b/libs/pbd/pbd/failed_constructor.h
@@ -22,7 +22,9 @@
#include <exception>
-class failed_constructor : public std::exception {
+#include "pbd/libpbd_visibility.h"
+
+class LIBPBD_API failed_constructor : public std::exception {
public:
virtual const char *what() const throw() { return "failed constructor"; }
};
diff --git a/libs/pbd/pbd/fastlog.h b/libs/pbd/pbd/fastlog.h
index f64ad996cf..e8aef4119d 100644
--- a/libs/pbd/pbd/fastlog.h
+++ b/libs/pbd/pbd/fastlog.h
@@ -10,7 +10,9 @@ as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
#include <math.h> /* for HUGE_VAL */
-static inline float fast_log2 (float val)
+#include "pbd/libpbd_visibility.h"
+
+LIBPBD_API static inline float fast_log2 (float val)
{
/* don't use reinterpret_cast<> because that prevents this
from being used by pure C code (for example, GnomeCanvasItems)
@@ -29,16 +31,16 @@ static inline float fast_log2 (float val)
return (val + log_2);
}
-static inline float fast_log (const float val)
+LIBPBD_API static inline float fast_log (const float val)
{
return (fast_log2 (val) * 0.69314718f);
}
-static inline float fast_log10 (const float val)
+LIBPBD_API static inline float fast_log10 (const float val)
{
return fast_log2(val) / 3.312500f;
}
-static inline float minus_infinity(void) { return -HUGE_VAL; }
+LIBPBD_API static inline float minus_infinity(void) { return -HUGE_VAL; }
#endif /* __pbd_fastlog_h__ */
diff --git a/libs/pbd/pbd/file_manager.h b/libs/pbd/pbd/file_manager.h
index 14552f9fef..d85c88fa46 100644
--- a/libs/pbd/pbd/file_manager.h
+++ b/libs/pbd/pbd/file_manager.h
@@ -25,11 +25,13 @@
#include <map>
#include <list>
#include <glibmm/threads.h>
+
+#include "pbd/libpbd_visibility.h"
#include "pbd/signals.h"
namespace PBD {
-class FileManager;
+class LIBPBD_API FileManager;
/** Parent class for FileDescriptors.
*
@@ -45,7 +47,7 @@ class FileManager;
* open files to stay within limits imposed by the operating system.
*/
-class FileDescriptor
+class LIBPBD_API FileDescriptor
{
public:
FileDescriptor (std::string const &, bool);
@@ -86,7 +88,7 @@ private:
/** FileDescriptor for a file to be opened using POSIX open */
-class FdFileDescriptor : public FileDescriptor
+class LIBPBD_API FdFileDescriptor : public FileDescriptor
{
public:
FdFileDescriptor (std::string const & file_name, bool writeable, mode_t mode);
@@ -107,7 +109,7 @@ private:
};
/** FileDescriptor for a file opened using stdio */
-class StdioFileDescriptor : public FileDescriptor
+class LIBPBD_API StdioFileDescriptor : public FileDescriptor
{
public:
StdioFileDescriptor (std::string const & file_name, std::string const & mode);
@@ -129,7 +131,7 @@ private:
/** Class to limit the number of files held open */
-class FileManager
+class LIBPBD_API FileManager
{
public:
FileManager ();
diff --git a/libs/pbd/pbd/floating.h b/libs/pbd/pbd/floating.h
index 105a976637..b03158c277 100644
--- a/libs/pbd/pbd/floating.h
+++ b/libs/pbd/pbd/floating.h
@@ -28,9 +28,11 @@
#include <cmath>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-union Float_t
+union LIBPBD_API Float_t
{
Float_t (float num = 0.0f) : f(num) {}
@@ -45,7 +47,7 @@ union Float_t
/* Note: ULPS = Units in the Last Place */
-static inline bool floateq (float a, float b, int max_ulps_diff)
+LIBPBD_API static inline bool floateq (float a, float b, int max_ulps_diff)
{
Float_t ua (a);
Float_t ub (b);
diff --git a/libs/pbd/pbd/forkexec.h b/libs/pbd/pbd/forkexec.h
index 236cffa301..e6d8f0c5ea 100644
--- a/libs/pbd/pbd/forkexec.h
+++ b/libs/pbd/pbd/forkexec.h
@@ -22,7 +22,9 @@
#include <unistd.h>
-pid_t forkexec(char **argv, char **envp, int outpipe[2], int inpipe[2]);
-pid_t forkexec_cmd(char *cmd, char **envp, int outpipe[2], int inpipe[2]);
+#include "pbd/libpbd_visibility.h"
+
+LIBPBD_API pid_t forkexec(char **argv, char **envp, int outpipe[2], int inpipe[2]);
+LIBPBD_API pid_t forkexec_cmd(char *cmd, char **envp, int outpipe[2], int inpipe[2]);
#endif // __forkexec_h__
diff --git a/libs/pbd/pbd/fpu.h b/libs/pbd/pbd/fpu.h
index ff3df481d0..6627951e9f 100644
--- a/libs/pbd/pbd/fpu.h
+++ b/libs/pbd/pbd/fpu.h
@@ -20,10 +20,11 @@
#ifndef __pbd_fpu_h__
#define __pbd_fpu_h__
-namespace PBD {
+#include "pbd/libpbd_visibility.h"
+namespace PBD {
-class FPU {
+class LIBPBD_API FPU {
private:
enum Flags {
HasFlushToZero = 0x1,
diff --git a/libs/pbd/pbd/functor_command.h b/libs/pbd/pbd/functor_command.h
index b651c6f775..d2aacd18ac 100644
--- a/libs/pbd/pbd/functor_command.h
+++ b/libs/pbd/pbd/functor_command.h
@@ -25,6 +25,7 @@
#include <string>
#include <map>
+#include "pbd/libpbd_visibility.h"
#include "pbd/xml++.h"
#include "pbd/shiva.h"
#include "pbd/command.h"
@@ -36,7 +37,7 @@
namespace PBD {
template <class obj_type, class arg_type>
-class FunctorCommand : public Command
+class LIBPBD_API FunctorCommand : public Command
{
private:
typedef void (obj_type::*functor_type)(arg_type);
diff --git a/libs/pbd/pbd/id.h b/libs/pbd/pbd/id.h
index 6a9332be53..a7d0c2c622 100644
--- a/libs/pbd/pbd/id.h
+++ b/libs/pbd/pbd/id.h
@@ -25,9 +25,11 @@
#include <glibmm/threads.h>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-class ID {
+class LIBPBD_API ID {
public:
ID ();
ID (std::string);
@@ -68,6 +70,7 @@ class ID {
};
}
-std::ostream& operator<< (std::ostream& ostr, const PBD::ID&);
+
+LIBPBD_API std::ostream& operator<< (std::ostream& ostr, const PBD::ID&);
#endif /* __pbd_id_h__ */
diff --git a/libs/pbd/pbd/libpbd_visibility.h b/libs/pbd/pbd/libpbd_visibility.h
new file mode 100644
index 0000000000..0aa309a4a4
--- /dev/null
+++ b/libs/pbd/pbd/libpbd_visibility.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2013 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __libpbd_libpbd_visibility_h__
+#define __libpbd_libpbd_visibility_h__
+
+/* _WIN32 is defined by most compilers targetting Windows, but within the
+ * ardour source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending
+ * on how a Windows build is built.
+ */
+
+#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW)
+ #define LIBPBD_DLL_IMPORT __declspec(dllimport)
+ #define LIBPBD_DLL_EXPORT __declspec(dllexport)
+ #define LIBPBD_DLL_LOCAL
+#else
+ #if __GNUC__ >= 4
+ #define LIBPBD_DLL_IMPORT __attribute__ ((visibility ("default")))
+ #define LIBPBD_DLL_EXPORT __attribute__ ((visibility ("default")))
+ #define LIBPBD_DLL_LOCAL __attribute__ ((visibility ("hidden")))
+ #else
+ #define LIBPBD_DLL_IMPORT
+ #define LIBPBD_DLL_EXPORT
+ #define LIBPBD_DLL_LOCAL
+ #define LIBPBD_DLL_IMPORT_CLASS
+ #define LIBPBD_DLL_EXPORT_CLASS
+ #endif
+#endif
+
+#ifdef LIBPBD_DLL // libpbd is a DLL
+#ifdef LIBPBD_DLL_EXPORTS // defined if we are building the libpbd DLL (instead of using it)
+ #define LIBPBD_API LIBPBD_DLL_EXPORT
+#else
+ #define LIBPBD_API LIBPBD_DLL_IMPORT
+#endif
+#define LIBPBD_LOCAL LIBPBD_DLL_LOCAL
+#else /* static lib, not DLL */
+#define LIBPBD_API
+#define LIBPBD_LOCAL
+#endif
+
+#endif /* __libpbd_libpbd_visibility_h__ */
diff --git a/libs/pbd/pbd/locale_guard.h b/libs/pbd/pbd/locale_guard.h
index 480cc0fddb..cac77ded24 100644
--- a/libs/pbd/pbd/locale_guard.h
+++ b/libs/pbd/pbd/locale_guard.h
@@ -20,9 +20,11 @@
#ifndef __pbd_locale_guard__
#define __pbd_locale_guard__
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-struct LocaleGuard {
+struct LIBPBD_API LocaleGuard {
LocaleGuard (const char*);
~LocaleGuard ();
const char* old;
diff --git a/libs/pbd/pbd/malign.h b/libs/pbd/pbd/malign.h
index bc78882dc7..07f42f586f 100644
--- a/libs/pbd/pbd/malign.h
+++ b/libs/pbd/pbd/malign.h
@@ -22,6 +22,8 @@
#include <stdlib.h>
-int cache_aligned_malloc (void** memptr, size_t size);
+#include "pbd/libpbd_visibility.h"
+
+LIBPBD_API int cache_aligned_malloc (void** memptr, size_t size);
#endif /* __pbd_malign_h__ */
diff --git a/libs/pbd/pbd/memento_command.h b/libs/pbd/pbd/memento_command.h
index 45cb100a36..ba09225608 100644
--- a/libs/pbd/pbd/memento_command.h
+++ b/libs/pbd/pbd/memento_command.h
@@ -23,6 +23,7 @@
#include <iostream>
+#include "pbd/libpbd_visibility.h"
#include "pbd/command.h"
#include "pbd/stacktrace.h"
#include "pbd/xml++.h"
@@ -49,7 +50,7 @@
* references to non-existant crossfades. To get around this, CrossfadeBinder
* can do `just-in-time' binding from the crossfade ID.
*/
-template <class obj_T>
+template <class obj_T> LIBPBD_API
class MementoCommandBinder : public PBD::Destructible
{
public:
@@ -66,7 +67,7 @@ public:
};
/** A simple MementoCommandBinder which binds directly to an object */
-template <class obj_T>
+template <class obj_T> LIBPBD_API
class SimpleMementoCommandBinder : public MementoCommandBinder<obj_T>
{
public:
@@ -98,7 +99,7 @@ private:
* (from Stateful::get_state()), so undo becomes restoring the before
* memento, and redo is restoring the after memento.
*/
-template <class obj_T>
+template <class obj_T> LIBPBD_API
class MementoCommand : public Command
{
public:
diff --git a/libs/pbd/pbd/mountpoint.h b/libs/pbd/pbd/mountpoint.h
index e0ec1be7f9..3500f8a4ca 100644
--- a/libs/pbd/pbd/mountpoint.h
+++ b/libs/pbd/pbd/mountpoint.h
@@ -22,6 +22,8 @@
#include <string>
-std::string mountpoint (std::string path);
+#include "pbd/libpbd_visibility.h"
+
+LIBPBD_API std::string mountpoint (std::string path);
#endif // __pbd_mountpoint_h__
diff --git a/libs/pbd/pbd/openuri.h b/libs/pbd/pbd/openuri.h
index ec17b5a34a..8ba6ffca62 100644
--- a/libs/pbd/pbd/openuri.h
+++ b/libs/pbd/pbd/openuri.h
@@ -22,9 +22,11 @@
#include <string>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
- bool open_uri (const char*);
- bool open_uri (const std::string&);
+ LIBPBD_API bool open_uri (const char*);
+ LIBPBD_API bool open_uri (const std::string&);
}
#endif
diff --git a/libs/pbd/pbd/pathexpand.h b/libs/pbd/pbd/pathexpand.h
index a7b9f7557a..5f1c03f8ee 100644
--- a/libs/pbd/pbd/pathexpand.h
+++ b/libs/pbd/pbd/pathexpand.h
@@ -21,9 +21,11 @@
#include <string>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
- std::string path_expand (std::string path);
- std::string search_path_expand (std::string path);
+ LIBPBD_API std::string path_expand (std::string path);
+ LIBPBD_API std::string search_path_expand (std::string path);
}
#endif /* __libpbd_path_expand_h__ */
diff --git a/libs/pbd/pbd/pathscanner.h b/libs/pbd/pbd/pathscanner.h
index 1b7ef58655..ef6499c759 100644
--- a/libs/pbd/pbd/pathscanner.h
+++ b/libs/pbd/pbd/pathscanner.h
@@ -24,7 +24,9 @@
#include <string>
#include <regex.h>
-class PathScanner
+#include "pbd/libpbd_visibility.h"
+
+class LIBPBD_API PathScanner
{
public:
diff --git a/libs/pbd/pbd/pbd.h b/libs/pbd/pbd/pbd.h
index 5b3745f0ed..6d2584f64b 100644
--- a/libs/pbd/pbd/pbd.h
+++ b/libs/pbd/pbd/pbd.h
@@ -20,10 +20,12 @@
#ifndef __libpbd_pbd_h__
#define __libpbd_pbd_h__
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
- bool init ();
- void cleanup ();
+ LIBPBD_API bool init ();
+ LIBPBD_API void cleanup ();
} // namespace PBD
diff --git a/libs/pbd/pbd/pool.h b/libs/pbd/pbd/pool.h
index 58c5861d23..165a3aac4b 100644
--- a/libs/pbd/pbd/pool.h
+++ b/libs/pbd/pbd/pool.h
@@ -25,12 +25,13 @@
#include <glibmm/threads.h>
+#include "pbd/libpbd_visibility.h"
#include "pbd/ringbuffer.h"
/** A pool of data items that can be allocated, read from and written to
* without system memory allocation or locking.
*/
-class Pool
+class LIBPBD_API Pool
{
public:
Pool (std::string name, unsigned long item_size, unsigned long nitems);
@@ -49,7 +50,7 @@ class Pool
void *block; ///< data storage area
};
-class SingleAllocMultiReleasePool : public Pool
+class LIBPBD_API SingleAllocMultiReleasePool : public Pool
{
public:
SingleAllocMultiReleasePool (std::string name, unsigned long item_size, unsigned long nitems);
@@ -63,7 +64,7 @@ class SingleAllocMultiReleasePool : public Pool
};
-class MultiAllocSingleReleasePool : public Pool
+class LIBPBD_API MultiAllocSingleReleasePool : public Pool
{
public:
MultiAllocSingleReleasePool (std::string name, unsigned long item_size, unsigned long nitems);
@@ -76,7 +77,7 @@ class MultiAllocSingleReleasePool : public Pool
Glib::Threads::Mutex m_lock;
};
-class PerThreadPool;
+class LIBPBD_API PerThreadPool;
/** Management of a per-thread pool of data that is allocated by one thread and
* freed by one other thread. Not safe for use when there is more than 1
@@ -90,7 +91,7 @@ class PerThreadPool;
* data), and so it calls alloc(), passes a pointer to the result of the alloc
* to another thread, which later calls push() to "free" it.
*/
-class CrossThreadPool : public Pool
+class LIBPBD_API CrossThreadPool : public Pool
{
public:
CrossThreadPool (std::string n, unsigned long isize, unsigned long nitems, PerThreadPool *);
@@ -112,7 +113,7 @@ class CrossThreadPool : public Pool
/** A class to manage per-thread pools of memory. One object of this class is instantiated,
* and then it is used to create per-thread pools for 1 or more threads as required.
*/
-class PerThreadPool
+class LIBPBD_API PerThreadPool
{
public:
PerThreadPool ();
diff --git a/libs/pbd/pbd/properties.h b/libs/pbd/pbd/properties.h
index e65929c60c..27a0be1895 100644
--- a/libs/pbd/pbd/properties.h
+++ b/libs/pbd/pbd/properties.h
@@ -26,6 +26,7 @@
#include <set>
#include <iostream>
+#include "pbd/libpbd_visibility.h"
#include "pbd/xml++.h"
#include "pbd/property_basics.h"
#include "pbd/property_list.h"
@@ -36,7 +37,7 @@ namespace PBD {
/** Parent class for classes which represent a single scalar property in a Stateful object */
template<class T>
-class PropertyTemplate : public PropertyBase
+class LIBPBD_API PropertyTemplate : public PropertyBase
{
public:
PropertyTemplate (PropertyDescriptor<T> p, T const& v)
@@ -196,7 +197,7 @@ private:
PropertyTemplate (PropertyTemplate<T> const &);
};
-template<class T>
+template<class T> LIBPBD_API
std::ostream & operator<<(std::ostream& os, PropertyTemplate<T> const& s)
{
return os << s.val ();
@@ -206,7 +207,7 @@ std::ostream & operator<<(std::ostream& os, PropertyTemplate<T> const& s)
* with types that can be written to / read from stringstreams.
*/
template<class T>
-class Property : public PropertyTemplate<T>
+class LIBPBD_API Property : public PropertyTemplate<T>
{
public:
Property (PropertyDescriptor<T> q, T const& v)
@@ -284,7 +285,7 @@ private:
* separators, etc.
*/
template<>
-class Property<std::string> : public PropertyTemplate<std::string>
+class LIBPBD_API Property<std::string> : public PropertyTemplate<std::string>
{
public:
Property (PropertyDescriptor<std::string> d, std::string const & v)
@@ -318,7 +319,7 @@ private:
};
template<class T>
-class EnumProperty : public Property<T>
+class LIBPBD_API EnumProperty : public Property<T>
{
public:
EnumProperty (PropertyDescriptor<T> q, T const& v)
@@ -351,7 +352,7 @@ private:
* one.
*/
template <class T>
-class SharedStatefulProperty : public PropertyBase
+class LIBPBD_API SharedStatefulProperty : public PropertyBase
{
public:
typedef boost::shared_ptr<T> Ptr;
diff --git a/libs/pbd/pbd/property_basics.h b/libs/pbd/pbd/property_basics.h
index 2255a3d79b..2da21ddb84 100644
--- a/libs/pbd/pbd/property_basics.h
+++ b/libs/pbd/pbd/property_basics.h
@@ -24,20 +24,21 @@
#include <set>
#include <vector>
+#include "pbd/libpbd_visibility.h"
#include "pbd/xml++.h"
class Command;
namespace PBD {
-class PropertyList;
-class StatefulDiffCommand;
+class LIBPBD_API PropertyList;
+class LIBPBD_API StatefulDiffCommand;
/** A unique identifier for a property of a Stateful object */
typedef GQuark PropertyID;
template<typename T>
-struct PropertyDescriptor {
+struct LIBPBD_API PropertyDescriptor {
PropertyDescriptor () : property_id (0) {}
PropertyDescriptor (PropertyID pid) : property_id (pid) {}
@@ -46,7 +47,7 @@ struct PropertyDescriptor {
};
/** A list of IDs of Properties that have changed in some situation or other */
-class PropertyChange : public std::set<PropertyID>
+class LIBPBD_API PropertyChange : public std::set<PropertyID>
{
public:
PropertyChange() {}
@@ -83,7 +84,7 @@ public:
* - to handle current state (when serializing Stateful objects)
* - to handle history since some operation was started (when making StatefulDiffCommands for undo)
*/
-class PropertyBase
+class LIBPBD_API PropertyBase
{
public:
PropertyBase (PropertyID pid)
diff --git a/libs/pbd/pbd/property_list.h b/libs/pbd/pbd/property_list.h
index 12b7995009..abb85e77d5 100644
--- a/libs/pbd/pbd/property_list.h
+++ b/libs/pbd/pbd/property_list.h
@@ -22,6 +22,7 @@
#include <map>
+#include "pbd/libpbd_visibility.h"
#include "pbd/property_basics.h"
class XMLNode;
@@ -29,7 +30,7 @@ class XMLNode;
namespace PBD {
/** A list of properties, mapped using their ID */
-class PropertyList : public std::map<PropertyID, PropertyBase*>
+class LIBPBD_API PropertyList : public std::map<PropertyID, PropertyBase*>
{
public:
PropertyList ();
@@ -61,7 +62,7 @@ protected:
* own Properties store them in an OwnedPropertyList
* to avoid having them deleted at the wrong time.
*/
-class OwnedPropertyList : public PropertyList
+class LIBPBD_API OwnedPropertyList : public PropertyList
{
public:
OwnedPropertyList();
diff --git a/libs/pbd/pbd/pthread_utils.h b/libs/pbd/pbd/pthread_utils.h
index 0c7b5f3ac1..c66feb73a5 100644
--- a/libs/pbd/pbd/pthread_utils.h
+++ b/libs/pbd/pbd/pthread_utils.h
@@ -25,18 +25,19 @@
#include <string>
#include <stdint.h>
-#include <pbd/signals.h>
+#include "pbd/libpbd_visibility.h"
+#include "pbd/signals.h"
-int pthread_create_and_store (std::string name, pthread_t *thread, void * (*start_routine)(void *), void * arg);
-void pthread_cancel_one (pthread_t thread);
-void pthread_cancel_all ();
-void pthread_kill_all (int signum);
-const char* pthread_name ();
-void pthread_set_name (const char* name);
+LIBPBD_API int pthread_create_and_store (std::string name, pthread_t *thread, void * (*start_routine)(void *), void * arg);
+LIBPBD_API void pthread_cancel_one (pthread_t thread);
+LIBPBD_API void pthread_cancel_all ();
+LIBPBD_API void pthread_kill_all (int signum);
+LIBPBD_API const char* pthread_name ();
+LIBPBD_API void pthread_set_name (const char* name);
namespace PBD {
- extern void notify_gui_about_thread_creation (std::string, pthread_t, std::string, int requests = 256);
- extern PBD::Signal4<void,std::string,pthread_t,std::string,uint32_t> ThreadCreatedWithRequestSize;
+ LIBPBD_API extern void notify_gui_about_thread_creation (std::string, pthread_t, std::string, int requests = 256);
+ LIBPBD_API extern PBD::Signal4<void,std::string,pthread_t,std::string,uint32_t> ThreadCreatedWithRequestSize;
}
#endif /* __pbd_pthread_utils__ */
diff --git a/libs/pbd/pbd/rcu.h b/libs/pbd/pbd/rcu.h
index 909954fc0e..6ee68afabf 100644
--- a/libs/pbd/pbd/rcu.h
+++ b/libs/pbd/pbd/rcu.h
@@ -25,6 +25,8 @@
#include <list>
+#include "pbd/libpbd_visibility.h"
+
/** @file Defines a set of classes to implement Read-Copy-Update. We do not attempt to define RCU here - use google.
The design consists of two parts: an RCUManager and an RCUWriter.
@@ -43,7 +45,7 @@
and managed object.
*/
template<class T>
-class RCUManager
+class LIBPBD_API RCUManager
{
public:
@@ -109,7 +111,7 @@ class RCUManager
means that no actual objects will be deleted incorrectly if this is misused.
*/
template<class T>
-class SerializedRCUManager : public RCUManager<T>
+class LIBPBD_API SerializedRCUManager : public RCUManager<T>
{
public:
@@ -212,7 +214,7 @@ private:
*/
template<class T>
-class RCUWriter
+class LIBPBD_API RCUWriter
{
public:
diff --git a/libs/pbd/pbd/receiver.h b/libs/pbd/pbd/receiver.h
index 32fb84fa38..d3303ae192 100644
--- a/libs/pbd/pbd/receiver.h
+++ b/libs/pbd/pbd/receiver.h
@@ -24,11 +24,12 @@
#include <sigc++/sigc++.h>
+#include "pbd/libpbd_visibility.h"
#include "transmitter.h"
class strstream;
-class Receiver : public sigc::trackable
+class LIBPBD_API Receiver : public sigc::trackable
{
public:
Receiver ();
diff --git a/libs/pbd/pbd/replace_all.h b/libs/pbd/pbd/replace_all.h
index 3bc465d89f..e7fcc1e0ce 100644
--- a/libs/pbd/pbd/replace_all.h
+++ b/libs/pbd/pbd/replace_all.h
@@ -22,6 +22,8 @@
#include <string>
-int replace_all (std::string& str, const std::string& target, const std::string& replacement);
+#include "pbd/libpbd_visibility.h"
+
+LIBPBD_API int replace_all (std::string& str, const std::string& target, const std::string& replacement);
#endif // __pbd_replace_all_h__
diff --git a/libs/pbd/pbd/ringbuffer.h b/libs/pbd/pbd/ringbuffer.h
index 652457b493..bb2b8244f9 100644
--- a/libs/pbd/pbd/ringbuffer.h
+++ b/libs/pbd/pbd/ringbuffer.h
@@ -23,8 +23,10 @@
#include <cstring>
#include <glib.h>
+#include "pbd/libpbd_visibility.h"
+
template<class T>
-class RingBuffer
+class LIBPBD_API RingBuffer
{
public:
RingBuffer (guint sz) {
@@ -118,7 +120,7 @@ class RingBuffer
guint size_mask;
};
-template<class T> guint
+template<class T> LIBPBD_API guint
RingBuffer<T>::read (T *dest, guint cnt)
{
guint free_cnt;
@@ -157,7 +159,7 @@ RingBuffer<T>::read (T *dest, guint cnt)
return to_read;
}
-template<class T> guint
+template<class T> LIBPBD_API guint
RingBuffer<T>::write (T const *src, guint cnt)
{
@@ -197,7 +199,7 @@ RingBuffer<T>::write (T const *src, guint cnt)
return to_write;
}
-template<class T> void
+template<class T> LIBPBD_API void
RingBuffer<T>::get_read_vector (RingBuffer<T>::rw_vector *vec)
{
@@ -238,7 +240,7 @@ RingBuffer<T>::get_read_vector (RingBuffer<T>::rw_vector *vec)
}
}
-template<class T> void
+template<class T> LIBPBD_API void
RingBuffer<T>::get_write_vector (RingBuffer<T>::rw_vector *vec)
{
diff --git a/libs/pbd/pbd/ringbufferNPT.h b/libs/pbd/pbd/ringbufferNPT.h
index e43f967592..65fe939597 100644
--- a/libs/pbd/pbd/ringbufferNPT.h
+++ b/libs/pbd/pbd/ringbufferNPT.h
@@ -25,12 +25,14 @@
#include <cstring>
#include <glib.h>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
/* ringbuffer class where the element size is not required to be a power of two */
template<class T>
-class RingBufferNPT
+class LIBPBD_API RingBufferNPT
{
public:
RingBufferNPT (size_t sz) {
@@ -118,7 +120,7 @@ class RingBufferNPT
mutable gint read_ptr;
};
-template<class T> size_t
+template<class T> LIBPBD_API size_t
RingBufferNPT<T>::read (T *dest, size_t cnt)
{
size_t free_cnt;
@@ -157,7 +159,7 @@ RingBufferNPT<T>::read (T *dest, size_t cnt)
return to_read;
}
-template<class T> size_t
+template<class T> LIBPBD_API size_t
RingBufferNPT<T>::write (const T *src, size_t cnt)
{
size_t free_cnt;
@@ -196,7 +198,7 @@ RingBufferNPT<T>::write (const T *src, size_t cnt)
return to_write;
}
-template<class T> void
+template<class T> LIBPBD_API void
RingBufferNPT<T>::get_read_vector (RingBufferNPT<T>::rw_vector *vec)
{
size_t free_cnt;
@@ -236,7 +238,7 @@ RingBufferNPT<T>::get_read_vector (RingBufferNPT<T>::rw_vector *vec)
}
}
-template<class T> void
+template<class T> LIBPBD_API void
RingBufferNPT<T>::get_write_vector (RingBufferNPT<T>::rw_vector *vec)
{
size_t free_cnt;
diff --git a/libs/pbd/pbd/search_path.h b/libs/pbd/pbd/search_path.h
index 5358d6e14c..ad0b6c75d5 100644
--- a/libs/pbd/pbd/search_path.h
+++ b/libs/pbd/pbd/search_path.h
@@ -23,6 +23,8 @@
#include <string>
#include <vector>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
/**
@@ -36,7 +38,7 @@ namespace PBD {
* The SearchPath class does not test whether the paths exist
* or are directories. It is basically just a container.
*/
-class SearchPath : public std::vector<std::string>
+class LIBPBD_API SearchPath : public std::vector<std::string>
{
public:
/**
diff --git a/libs/pbd/pbd/selectable.h b/libs/pbd/pbd/selectable.h
index 85f3e79ab0..cb4677cba4 100644
--- a/libs/pbd/pbd/selectable.h
+++ b/libs/pbd/pbd/selectable.h
@@ -28,14 +28,16 @@
#include <sys/types.h>
+#include "pbd/libpbd_visibility.h"
+
namespace Select {
- enum Condition {
+ enum LIBPBD_API Condition {
Readable = 0x1,
Writable = 0x2,
Exception = 0x4
};
-class Selectable : public sigc::trackable
+class LIBPBD_API Selectable : public sigc::trackable
{
public:
@@ -70,7 +72,7 @@ class Selectable : public sigc::trackable
std::string path;
};
-class Selector {
+class LIBPBD_API Selector {
private:
int post_select (fd_set *, fd_set *, fd_set *);
int _max_fd;
diff --git a/libs/pbd/pbd/semaphore.h b/libs/pbd/pbd/semaphore.h
index e54063a15a..a2390f5a18 100644
--- a/libs/pbd/pbd/semaphore.h
+++ b/libs/pbd/pbd/semaphore.h
@@ -29,6 +29,7 @@
# include <errno.h>
#endif
+#include "pbd/libpbd_visibility.h"
#include "pbd/failed_constructor.h"
namespace PBD {
@@ -45,7 +46,7 @@ namespace PBD {
only safe way to reliably signal from a real-time audio thread. The
counting semantics also complement ringbuffers of events nicely.
*/
-class Semaphore
+class LIBPBD_API Semaphore
{
public:
/**
diff --git a/libs/pbd/pbd/semutils.h b/libs/pbd/pbd/semutils.h
index 6f5f0e9331..719a3d0f46 100644
--- a/libs/pbd/pbd/semutils.h
+++ b/libs/pbd/pbd/semutils.h
@@ -21,9 +21,11 @@
#include <semaphore.h>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-class ProcessSemaphore {
+class LIBPBD_API ProcessSemaphore {
private:
#ifdef __APPLE__
sem_t* _sem;
diff --git a/libs/pbd/pbd/sequence_property.h b/libs/pbd/pbd/sequence_property.h
index b9d59724dd..28775b5f3c 100644
--- a/libs/pbd/pbd/sequence_property.h
+++ b/libs/pbd/pbd/sequence_property.h
@@ -27,6 +27,7 @@
#include <boost/function.hpp>
+#include "pbd/libpbd_visibility.h"
#include "pbd/convert.h"
#include "pbd/id.h"
#include "pbd/property_basics.h"
@@ -43,7 +44,7 @@ namespace PBD {
* any change.
*/
template<typename Container>
-class SequenceProperty : public PropertyBase
+class LIBPBD_API SequenceProperty : public PropertyBase
{
public:
typedef std::set<typename Container::value_type> ChangeContainer;
diff --git a/libs/pbd/pbd/shortpath.h b/libs/pbd/pbd/shortpath.h
index 55431bf34e..48dbb0eee2 100644
--- a/libs/pbd/pbd/shortpath.h
+++ b/libs/pbd/pbd/shortpath.h
@@ -22,6 +22,8 @@
#include <glibmm/ustring.h>
-Glib::ustring short_path (const Glib::ustring& path, Glib::ustring::size_type target_characters);
+#include "pbd/libpbd_visibility.h"
+
+LIBPBD_API Glib::ustring short_path (const Glib::ustring& path, Glib::ustring::size_type target_characters);
#endif /* __pbd_shortpath_h__ */
diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h
index 69c52f57cf..871a2c0b18 100644
--- a/libs/pbd/pbd/signals.h
+++ b/libs/pbd/pbd/signals.h
@@ -31,13 +31,14 @@
#include <boost/enable_shared_from_this.hpp>
#include <boost/optional.hpp>
+#include "pbd/libpbd_visibility.h"
#include "pbd/event_loop.h"
namespace PBD {
-class Connection;
+class LIBPBD_API Connection;
-class SignalBase
+class LIBPBD_API SignalBase
{
public:
virtual ~SignalBase () {}
@@ -47,7 +48,7 @@ protected:
Glib::Threads::Mutex _mutex;
};
-class Connection : public boost::enable_shared_from_this<Connection>
+class LIBPBD_API Connection : public boost::enable_shared_from_this<Connection>
{
public:
Connection (SignalBase* b) : _signal (b) {}
@@ -73,7 +74,7 @@ private:
};
template<typename R>
-class OptionalLastValue
+class LIBPBD_API OptionalLastValue
{
public:
typedef boost::optional<R> result_type;
@@ -92,7 +93,7 @@ public:
typedef boost::shared_ptr<Connection> UnscopedConnection;
-class ScopedConnection
+class LIBPBD_API ScopedConnection
{
public:
ScopedConnection () {}
@@ -123,7 +124,7 @@ private:
UnscopedConnection _c;
};
-class ScopedConnectionList : public boost::noncopyable
+class LIBPBD_API ScopedConnectionList : public boost::noncopyable
{
public:
ScopedConnectionList();
diff --git a/libs/pbd/pbd/sndfile_manager.h b/libs/pbd/pbd/sndfile_manager.h
index 2167cadf5f..7abc8ea3d6 100644
--- a/libs/pbd/pbd/sndfile_manager.h
+++ b/libs/pbd/pbd/sndfile_manager.h
@@ -25,13 +25,15 @@
#include <map>
#include <sndfile.h>
#include <glibmm/threads.h>
+
+#include "pbd/libpbd_visibility.h"
#include "pbd/signals.h"
#include "pbd/file_manager.h"
namespace PBD {
/** FileDescriptor for a file to be opened using libsndfile */
-class SndFileDescriptor : public FileDescriptor
+class LIBPBD_API SndFileDescriptor : public FileDescriptor
{
public:
SndFileDescriptor (std::string const & file_name, bool writeable, SF_INFO* info);
diff --git a/libs/pbd/pbd/stacktrace.h b/libs/pbd/pbd/stacktrace.h
index 94d07cab96..c4381bc0ed 100644
--- a/libs/pbd/pbd/stacktrace.h
+++ b/libs/pbd/pbd/stacktrace.h
@@ -34,12 +34,15 @@
#include <cstdlib>
#endif
+#include "pbd/libpbd_visibility.h"
+
+
namespace PBD {
- void stacktrace (std::ostream& out, int levels = 0);
- void trace_twb();
+ LIBPBD_API void stacktrace (std::ostream& out, int levels = 0);
+ LIBPBD_API void trace_twb();
template<typename T>
-class thing_with_backtrace
+class LIBPBD_API thing_with_backtrace
{
public:
thing_with_backtrace () {
@@ -108,8 +111,8 @@ private:
static Glib::Threads::Mutex all_mutex;
};
-template<typename T> std::list<PBD::thing_with_backtrace<T> *> PBD::thing_with_backtrace<T>::all;
-template<typename T> Glib::Threads::Mutex PBD::thing_with_backtrace<T>::all_mutex;
+template<typename T> LIBPBD_API std::list<PBD::thing_with_backtrace<T> *> PBD::thing_with_backtrace<T>::all;
+template<typename T> LIBPBD_API Glib::Threads::Mutex PBD::thing_with_backtrace<T>::all_mutex;
} // namespace PBD
diff --git a/libs/pbd/pbd/stateful.h b/libs/pbd/pbd/stateful.h
index 4808bc2911..7035af57c3 100644
--- a/libs/pbd/pbd/stateful.h
+++ b/libs/pbd/pbd/stateful.h
@@ -24,6 +24,7 @@
#include <list>
#include <cassert>
+#include "pbd/libpbd_visibility.h"
#include "pbd/id.h"
#include "pbd/xml++.h"
#include "pbd/property_basics.h"
@@ -34,14 +35,14 @@ class XMLNode;
namespace PBD {
namespace sys {
- class path;
+ class LIBPBD_API path;
}
-class PropertyList;
-class OwnedPropertyList;
+class LIBPBD_API PropertyList;
+class LIBPBD_API OwnedPropertyList;
/** Base class for objects with saveable and undoable state */
-class Stateful {
+class LIBPBD_API Stateful {
public:
Stateful ();
virtual ~Stateful();
diff --git a/libs/pbd/pbd/stateful_diff_command.h b/libs/pbd/pbd/stateful_diff_command.h
index 2a213d7a17..f075a99746 100644
--- a/libs/pbd/pbd/stateful_diff_command.h
+++ b/libs/pbd/pbd/stateful_diff_command.h
@@ -22,18 +22,20 @@
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
+
+#include "pbd/libpbd_visibility.h"
#include "pbd/command.h"
namespace PBD
{
-class StatefulDestructible;
-class PropertyList;
+class LIBPBD_API StatefulDestructible;
+class LIBPBD_API PropertyList;
/** A Command which stores its action as the differences between the before and after
* state of a Stateful object.
*/
-class StatefulDiffCommand : public Command
+class LIBPBD_API StatefulDiffCommand : public Command
{
public:
StatefulDiffCommand (boost::shared_ptr<StatefulDestructible>);
diff --git a/libs/pbd/pbd/statefuldestructible.h b/libs/pbd/pbd/statefuldestructible.h
index 36eb43147c..79f5356c9f 100644
--- a/libs/pbd/pbd/statefuldestructible.h
+++ b/libs/pbd/pbd/statefuldestructible.h
@@ -20,12 +20,13 @@
#ifndef __pbd_stateful_destructible_h__
#define __pbd_stateful_destructible_h__
+#include "pbd/libpbd_visibility.h"
#include "pbd/stateful.h"
#include "pbd/destructible.h"
namespace PBD {
-class StatefulDestructible : public Stateful, public Destructible
+class LIBPBD_API StatefulDestructible : public Stateful, public Destructible
{
};
diff --git a/libs/pbd/pbd/stl_delete.h b/libs/pbd/pbd/stl_delete.h
index bca0ea9e21..b98bb5e8e3 100644
--- a/libs/pbd/pbd/stl_delete.h
+++ b/libs/pbd/pbd/stl_delete.h
@@ -20,12 +20,13 @@
#ifndef __libmisc_stl_delete_h__
#define __libmisc_stl_delete_h__
+#include "pbd/libpbd_visibility.h"
/* To actually use any of these deletion functions, you need to
first include the revelant container type header.
*/
#if defined(_CPP_VECTOR) || defined(_GLIBCXX_VECTOR) || defined(__SGI_STL_VECTOR) || defined(_LIBCPP_VECTOR)
-template<class T> void vector_delete (std::vector<T *> *vec)
+template<class T> LIBPBD_API void vector_delete (std::vector<T *> *vec)
{
typename std::vector<T *>::iterator i;
@@ -37,7 +38,7 @@ template<class T> void vector_delete (std::vector<T *> *vec)
#endif // _CPP_VECTOR || _GLIBCXX_VECTOR || __SGI_STL_VECTOR || _LIBCPP_VECTOR
#if defined(_CPP_MAP) || defined(_GLIBCXX_MAP) || defined(__SGI_STL_MAP)
-template<class K, class T> void map_delete (std::map<K, T *> *m)
+template<class K, class T> LIBPBD_API void map_delete (std::map<K, T *> *m)
{
typename std::map<K, T *>::iterator i;
@@ -49,7 +50,7 @@ template<class K, class T> void map_delete (std::map<K, T *> *m)
#endif // _CPP_MAP || _GLIBCXX_MAP || __SGI_STL_MAP
#if defined(_CPP_LIST) || defined(_GLIBCXX_LIST) || defined(__SGI_STL_LIST)
-template<class T> void list_delete (std::list<T *> *l)
+template<class T> LIBPBD_API void list_delete (std::list<T *> *l)
{
typename std::list<T *>::iterator i;
@@ -62,7 +63,7 @@ template<class T> void list_delete (std::list<T *> *l)
#endif // _CPP_LIST || _GLIBCXX_LIST || __SGI_STL_LIST
#if defined(_CPP_SLIST) || defined(_GLIBCXX_SLIST) || defined(__SGI_STL_SLIST)
-template<class T> void slist_delete (std::slist<T *> *l)
+template<class T> LIBPBD_API void slist_delete (std::slist<T *> *l)
{
typename std::slist<T *>::iterator i;
@@ -75,7 +76,7 @@ template<class T> void slist_delete (std::slist<T *> *l)
#endif // _CPP_SLIST || _GLIBCXX_SLIST || __SGI_STL_SLIST
#if defined(_CPP_SET) || defined(_GLIBCXX_SET) || defined(__SGI_STL_SET)
-template<class T> void set_delete (std::set<T *> *sset)
+template<class T> void LIBPBD_API set_delete (std::set<T *> *sset)
{
typename std::set<T *>::iterator i;
diff --git a/libs/pbd/pbd/stl_functors.h b/libs/pbd/pbd/stl_functors.h
index 3c83a1ae2f..5815dacb05 100644
--- a/libs/pbd/pbd/stl_functors.h
+++ b/libs/pbd/pbd/stl_functors.h
@@ -22,8 +22,10 @@
#include <string>
+#include "pbd/libpbd_visibility.h"
+
#ifndef LESS_STRING_P
-struct less<std::string *> {
+struct LIBPBD_API less<std::string *> {
bool operator()(std::string *s1, std::string *s2) const {
return *s1 < *s2;
}
@@ -32,7 +34,7 @@ struct less<std::string *> {
#endif // LESS_STRING_P
#ifndef LESS_CONST_STRING_P
-struct less<const std::string *> {
+struct LIBPBD_API less<const std::string *> {
bool operator()(const std::string *s1, const std::string *s2) const {
return *s1 < *s2;
}
@@ -41,7 +43,7 @@ struct less<const std::string *> {
#endif // LESS_CONST_STRING_P
#ifndef LESS_CONST_CHAR_P
-struct less<const char *>
+struct LIBPBD_API less<const char *>
{
bool operator()(const char* s1, const char* s2) const {
return strcmp(s1, s2) < 0;
@@ -51,7 +53,7 @@ struct less<const char *>
#endif // LESS_CONST_CHAR_P
#ifndef LESS_CONST_FLOAT_P
-struct less<const float *>
+struct LIBPBD_API less<const float *>
{
bool operator()(const float *n1, const float *n2) const {
return *n1 < *n2;
@@ -61,7 +63,7 @@ struct less<const float *>
#endif // LESS_CONST_FLOAT_P
#ifndef EQUAL_TO_CONST_CHAR_P
-struct equal_to<const char *>
+struct LIBPBD_API equal_to<const char *>
{
bool operator()(const char *s1, const char *s2) const {
return strcmp (s1, s2) == 0;
@@ -71,7 +73,7 @@ struct equal_to<const char *>
#endif // EQUAL_TO_CONST_CHAR_P
#ifndef EQUAL_TO_STRING_P
-struct equal_to<std::string *>
+struct LIBPBD_API equal_to<std::string *>
{
bool operator()(const std::string *s1, const std::string *s2) const {
return *s1 == *s2;
@@ -81,7 +83,7 @@ struct equal_to<std::string *>
#endif // EQUAL_TO_STRING_P
#ifndef LESS_CONST_STRING_R
-struct less<const std::string &> {
+struct LIBPBD_API less<const std::string &> {
bool operator() (const std::string &s1, const std::string &s2) {
return s1 < s2;
}
diff --git a/libs/pbd/pbd/strsplit.h b/libs/pbd/pbd/strsplit.h
index 25c4526b6a..045974d00c 100644
--- a/libs/pbd/pbd/strsplit.h
+++ b/libs/pbd/pbd/strsplit.h
@@ -24,7 +24,9 @@
#include <vector>
#include <glibmm/ustring.h>
-extern void split (std::string, std::vector<std::string>&, char);
-extern void split (Glib::ustring, std::vector<Glib::ustring>&, char);
+#include "pbd/libpbd_visibility.h"
+
+LIBPBD_API extern void split (std::string, std::vector<std::string>&, char);
+LIBPBD_API extern void split (Glib::ustring, std::vector<Glib::ustring>&, char);
#endif // __pbd_strplit_h__
diff --git a/libs/pbd/pbd/textreceiver.h b/libs/pbd/pbd/textreceiver.h
index c9a1d0aecc..9fe7e0828d 100644
--- a/libs/pbd/pbd/textreceiver.h
+++ b/libs/pbd/pbd/textreceiver.h
@@ -22,9 +22,10 @@
#include <string>
+#include "pbd/libpbd_visibility.h"
#include "receiver.h"
-class TextReceiver : public Receiver
+class LIBPBD_API TextReceiver : public Receiver
{
public:
TextReceiver (const std::string &n);
diff --git a/libs/pbd/pbd/thrown_error.h b/libs/pbd/pbd/thrown_error.h
index 0a63085f11..be68be918f 100644
--- a/libs/pbd/pbd/thrown_error.h
+++ b/libs/pbd/pbd/thrown_error.h
@@ -19,6 +19,7 @@
#ifndef __qm_thrown_error_h__
#define __qm_thrown_error_h__
+#include "pbd/libpbd_visibility.h"
#include "transmitter.h"
#define SAFE_THROW(T) \
@@ -26,7 +27,7 @@
(*sent) << rdbuf(); \
throw sent
-class ThrownError : public Transmitter {
+class LIBPBD_API ThrownError : public Transmitter {
public:
ThrownError () : Transmitter (Transmitter::Throw) {}
protected:
diff --git a/libs/pbd/pbd/tokenizer.h b/libs/pbd/pbd/tokenizer.h
index 39954194fb..b4b3b107c0 100644
--- a/libs/pbd/pbd/tokenizer.h
+++ b/libs/pbd/pbd/tokenizer.h
@@ -23,6 +23,7 @@
#include <iterator>
#include <string>
+#include "pbd/libpbd_visibility.h"
#include "pbd/whitespace.h"
namespace PBD {
@@ -36,7 +37,7 @@ namespace PBD {
are discarded.
*/
template<typename StringType, typename Iter>
-unsigned int
+LIBPBD_API unsigned int
tokenize(const StringType& str,
const StringType& delims,
Iter it,
diff --git a/libs/pbd/pbd/touchable.h b/libs/pbd/pbd/touchable.h
index 12f1c443fd..ed7d75df52 100644
--- a/libs/pbd/pbd/touchable.h
+++ b/libs/pbd/pbd/touchable.h
@@ -19,7 +19,9 @@
#ifndef __pbd_touchable_h__
#define __pbd_touchable_h__
-class Touchable
+#include "pbd/libpbd_visibility.h"
+
+class LIBPBD_API Touchable
{
public:
Touchable() : _delete_after_touch (false) {}
@@ -35,7 +37,7 @@ class Touchable
};
template<class T>
-class DynamicTouchable : public Touchable
+class LIBPBD_API DynamicTouchable : public Touchable
{
public:
DynamicTouchable (T& t, void (T::*m)(void))
@@ -51,7 +53,7 @@ class DynamicTouchable : public Touchable
};
template<class T1, class T2>
-class DynamicTouchable1 : public Touchable
+class LIBPBD_API DynamicTouchable1 : public Touchable
{
public:
DynamicTouchable1 (T1& t, void (T1::*m)(T2), T2 a)
@@ -68,7 +70,7 @@ class DynamicTouchable1 : public Touchable
};
template<class T1, class T2, class T3>
-class DynamicTouchable2 : public Touchable
+class LIBPBD_API DynamicTouchable2 : public Touchable
{
public:
DynamicTouchable2 (T1& t, void (T1::*m)(T2, T3), T2 a1, T3 a2)
diff --git a/libs/pbd/pbd/transmitter.h b/libs/pbd/pbd/transmitter.h
index 6da521dd26..d77fca8da3 100644
--- a/libs/pbd/pbd/transmitter.h
+++ b/libs/pbd/pbd/transmitter.h
@@ -25,7 +25,9 @@
#include <sigc++/sigc++.h>
-class Transmitter : public std::stringstream
+#include "pbd/libpbd_visibility.h"
+
+class LIBPBD_API Transmitter : public std::stringstream
{
public:
@@ -100,6 +102,6 @@ endmsg (std::ostream &ostr)
}
-extern "C" { void pbd_c_error (const char *); }
+extern "C" { LIBPBD_API void pbd_c_error (const char *); }
#endif // __libmisc_transmitter_h__
diff --git a/libs/pbd/pbd/undo.h b/libs/pbd/pbd/undo.h
index 11ff2bf321..753bc13b15 100644
--- a/libs/pbd/pbd/undo.h
+++ b/libs/pbd/pbd/undo.h
@@ -27,11 +27,12 @@
#include <sigc++/bind.h>
#include <sys/time.h>
+#include "pbd/libpbd_visibility.h"
#include "pbd/command.h"
typedef sigc::slot<void> UndoAction;
-class UndoTransaction : public Command
+class LIBPBD_API UndoTransaction : public Command
{
public:
UndoTransaction ();
@@ -70,7 +71,7 @@ class UndoTransaction : public Command
void about_to_explicitly_delete ();
};
-class UndoHistory : public PBD::ScopedConnectionList
+class LIBPBD_API UndoHistory : public PBD::ScopedConnectionList
{
public:
UndoHistory();
diff --git a/libs/pbd/pbd/unknown_type.h b/libs/pbd/pbd/unknown_type.h
index 3610d4f0ed..4d984269a7 100644
--- a/libs/pbd/pbd/unknown_type.h
+++ b/libs/pbd/pbd/unknown_type.h
@@ -22,7 +22,9 @@
#include <exception>
-class unknown_type : public std::exception {
+#include "pbd/libpbd_visibility.h"
+
+class LIBPBD_API unknown_type : public std::exception {
public:
virtual const char *what() const throw() { return "unknown type"; }
};
diff --git a/libs/pbd/pbd/unwind.h b/libs/pbd/pbd/unwind.h
index 6062e1f6e1..cf7998fdd4 100644
--- a/libs/pbd/pbd/unwind.h
+++ b/libs/pbd/pbd/unwind.h
@@ -20,10 +20,12 @@
#ifndef __libpbd_unwinder_h__
#define __libpbd_unwinder_h__
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
template <typename T>
-class Unwinder {
+class LIBPBD_API Unwinder {
public:
Unwinder (T& var, T new_val) : _var (var), _old_val (var) { var = new_val; }
~Unwinder () { _var = _old_val; }
diff --git a/libs/pbd/pbd/uuid.h b/libs/pbd/pbd/uuid.h
index 16a67436b7..333a902b4d 100644
--- a/libs/pbd/pbd/uuid.h
+++ b/libs/pbd/pbd/uuid.h
@@ -24,9 +24,11 @@
#include <string>
#include <uuid/uuid.h>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-class UUID {
+class LIBPBD_API UUID {
public:
UUID () { uuid_generate (id); }
diff --git a/libs/pbd/pbd/uuid_boost.h b/libs/pbd/pbd/uuid_boost.h
index 275b72648a..0219603723 100644
--- a/libs/pbd/pbd/uuid_boost.h
+++ b/libs/pbd/pbd/uuid_boost.h
@@ -25,9 +25,11 @@
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
-class UUID : public boost::uuids::uuid {
+class LIBPBD_API UUID : public boost::uuids::uuid {
public:
UUID ()
diff --git a/libs/pbd/pbd/whitespace.h b/libs/pbd/pbd/whitespace.h
index 444be112b0..5816b84cae 100644
--- a/libs/pbd/pbd/whitespace.h
+++ b/libs/pbd/pbd/whitespace.h
@@ -22,11 +22,13 @@
#include <string>
+#include "pbd/libpbd_visibility.h"
+
namespace PBD {
// returns the empty string if the entire string is whitespace
// so check length after calling.
-extern void strip_whitespace_edges (std::string& str);
+ LIBPBD_API extern void strip_whitespace_edges (std::string& str);
} // namespace PBD
diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h
index bff863e4c6..e6795e5d45 100644
--- a/libs/pbd/pbd/xml++.h
+++ b/libs/pbd/pbd/xml++.h
@@ -17,6 +17,9 @@
*/
+#ifndef __XML_H
+#define __XML_H
+
/* xml++.h
* libxml++ and this file are copyright (C) 2000 by Ari Johnson, and
* are covered by the GNU Lesser General Public License, which should be
@@ -34,8 +37,7 @@
#include <libxml/tree.h>
#include <boost/shared_ptr.hpp>
-#ifndef __XML_H
-#define __XML_H
+#include "pbd/libpbd_visibility.h"
class XMLTree;
class XMLNode;
@@ -50,7 +52,7 @@ typedef XMLPropertyList::iterator XMLPropertyIterator;
typedef XMLPropertyList::const_iterator XMLPropertyConstIterator;
typedef std::map<std::string, XMLProperty*> XMLPropertyMap;
-class XMLTree {
+class LIBPBD_API XMLTree {
public:
XMLTree();
XMLTree(const std::string& fn, bool validate = false);
@@ -90,7 +92,7 @@ private:
int _compression;
};
-class XMLNode {
+class LIBPBD_API XMLNode {
public:
XMLNode(const std::string& name);
XMLNode(const std::string& name, const std::string& content);
@@ -148,7 +150,7 @@ private:
void clear_lists ();
};
-class XMLProperty {
+class LIBPBD_API XMLProperty {
public:
XMLProperty(const std::string& n, const std::string& v = std::string());
~XMLProperty();
@@ -162,7 +164,7 @@ private:
std::string _value;
};
-class XMLException: public std::exception {
+class LIBPBD_API XMLException: public std::exception {
public:
explicit XMLException(const std::string msg) : _message(msg) {}
virtual ~XMLException() throw() {}
diff --git a/libs/pbd/wscript b/libs/pbd/wscript
index ffbe0e0d19..be68c40dbf 100644
--- a/libs/pbd/wscript
+++ b/libs/pbd/wscript
@@ -114,10 +114,15 @@ def build(bld):
if bld.is_defined ('INTERNAL_SHARED_LIBS'):
print('BUILD SHARED LIB')
obj = bld.shlib(features = 'cxx cxxshlib', source=libpbd_sources)
+ obj.defines = [ 'LIBPBD_DLL=1',
+ 'LIBPBD_DLL_EXPORTS=1'
+ ]
+
else:
print('BUILD STATIC LIB')
obj = bld.stlib(features = 'cxx cxxstlib', source=libpbd_sources)
obj.cxxflags = [ '-fPIC' ]
+ obj.defines = []
if bld.is_defined('DEBUG_RT_ALLOC'):
obj.source += 'debug_rt_alloc.c'
@@ -134,7 +139,7 @@ def build(bld):
obj.uselib += ' OSX'
obj.vnum = LIBPBD_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
- obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"']
+ obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"' ]
if bld.env['build_target'] == 'x86_64':
obj.defines += [ 'USE_X86_64_ASM' ]