'libs/ardour' - DLL visibility stuff and associated changes needed for building with MSVC. Currently includes debugging information and things that are just commented out until we have known compatibility with the other platforms (i.e. contains stuff to be removed at a later date)

This commit is contained in:
John Emmas 2014-01-14 10:13:12 +00:00
parent 5f0492deae
commit eb023b7496
14 changed files with 33 additions and 27 deletions

View file

@ -49,8 +49,8 @@ namespace ARDOUR {
class AudioEngine;
LIBARDOUR_API extern PBD::Signal1<void,std::string> BootMessage;
LIBARDOUR_API extern PBD::Signal0<void> GUIIdle;
extern LIBARDOUR_API PBD::Signal1<void,std::string> BootMessage;
extern LIBARDOUR_API PBD::Signal0<void> GUIIdle;
/**
* @param with_vst true to enable VST Support
@ -66,9 +66,9 @@ namespace ARDOUR {
LIBARDOUR_API bool no_auto_connect ();
LIBARDOUR_API void make_property_quarks ();
LIBARDOUR_API extern PBD::PropertyChange bounds_change;
extern LIBARDOUR_API PBD::PropertyChange bounds_change;
LIBARDOUR_API extern const char* const ardour_config_info;
extern /*LIBARDOUR_API*/ const char* const ardour_config_info;
LIBARDOUR_API void find_bindings_files (std::map<std::string,std::string>&);

View file

@ -27,7 +27,7 @@ namespace ARDOUR {
/** Contains notes and controllers */
template<typename T>
class LIBARDOUR_API AutomatableSequence : public Automatable, public Evoral::Sequence<T> {
class /*LIBARDOUR_API*/ AutomatableSequence : public Automatable, public Evoral::Sequence<T> {
public:
AutomatableSequence(Session& s)
: Evoral::ControlSet()

View file

@ -26,7 +26,7 @@
namespace ARDOUR {
template<typename T>
class LIBARDOUR_API ComparableSharedPtr : public boost::shared_ptr<T>
class /*LIBARDOUR_API*/ ComparableSharedPtr : public boost::shared_ptr<T>
, public boost::less_than_comparable<ComparableSharedPtr<T> >
{
public:

View file

@ -52,7 +52,7 @@ class LIBARDOUR_API ConfigVariableBase {
};
template<class T>
class LIBARDOUR_API ConfigVariable : public ConfigVariableBase
class /*LIBARDOUR_API*/ ConfigVariable : public ConfigVariableBase
{
public:
@ -92,7 +92,7 @@ class LIBARDOUR_API ConfigVariable : public ConfigVariableBase
/** Specialisation of ConfigVariable for std::string to cope with whitespace properly */
template<>
class LIBARDOUR_API ConfigVariable<std::string> : public ConfigVariableBase
class /*LIBARDOUR_API*/ ConfigVariable<std::string> : public ConfigVariableBase
{
public:
@ -127,7 +127,7 @@ class LIBARDOUR_API ConfigVariable<std::string> : public ConfigVariableBase
};
template<>
class LIBARDOUR_API ConfigVariable<bool> : public ConfigVariableBase
class /*LIBARDOUR_API*/ ConfigVariable<bool> : public ConfigVariableBase
{
public:
@ -164,7 +164,7 @@ class LIBARDOUR_API ConfigVariable<bool> : public ConfigVariableBase
};
template<class T>
class LIBARDOUR_API ConfigVariableWithMutation : public ConfigVariable<T>
class /*LIBARDOUR_API*/ ConfigVariableWithMutation : public ConfigVariable<T>
{
public:
ConfigVariableWithMutation (std::string name, T val, T (*m)(T))
@ -193,7 +193,7 @@ class LIBARDOUR_API ConfigVariableWithMutation : public ConfigVariable<T>
};
template<>
class LIBARDOUR_API ConfigVariableWithMutation<std::string> : public ConfigVariable<std::string>
class /*LIBARDOUR_API*/ ConfigVariableWithMutation<std::string> : public ConfigVariable<std::string>
{
public:
ConfigVariableWithMutation (std::string name, std::string val, std::string (*m)(std::string))

View file

@ -35,6 +35,7 @@ namespace PBD {
LIBARDOUR_API extern uint64_t SnapBBT;
LIBARDOUR_API extern uint64_t Configuration;
LIBARDOUR_API extern uint64_t Latency;
LIBARDOUR_API extern uint64_t Peaks;
LIBARDOUR_API extern uint64_t Processors;
LIBARDOUR_API extern uint64_t ProcessThreads;
LIBARDOUR_API extern uint64_t Graph;

View file

@ -38,6 +38,7 @@ namespace ARDOUR {
LIBARDOUR_API extern const char* const templates_dir_name;
LIBARDOUR_API extern const char* const route_templates_dir_name;
LIBARDOUR_API extern const char* const surfaces_dir_name;
LIBARDOUR_API extern const char* const ladspa_dir_name;
LIBARDOUR_API extern const char* const user_config_dir_name;
LIBARDOUR_API extern const char* const panner_dir_name;
LIBARDOUR_API extern const char* const backend_dir_name;

View file

@ -114,7 +114,7 @@ class LIBARDOUR_API ExportFormatBase {
};
/// Class for managing selection and compatibility states
class SelectableCompatible {
class LIBARDOUR_API SelectableCompatible {
public:
SelectableCompatible ()
: _selected (false), _compatible (true) { }

View file

@ -43,14 +43,14 @@ namespace ARDOUR {
* @return the search path to be used when looking for per-system
* configuration files. This may include user configuration files.
*/
LIBARDOUR_API PBD::SearchPath ardour_config_search_path ();
LIBARDOUR_API PBD::Searchpath ardour_config_search_path ();
/**
* @return the search path to be used when looking for data files
* that could be shared by systems (h/w and configuration independent
* files, such as icons, XML files, etc)
*/
LIBARDOUR_API PBD::SearchPath ardour_data_search_path ();
LIBARDOUR_API PBD::Searchpath ardour_data_search_path ();
} // namespace ARDOUR

View file

@ -58,7 +58,7 @@ public:
NoteMode note_mode() const { return (percussive() ? Percussive : Sustained); }
void set_note_mode(NoteMode mode) { set_percussive(mode == Percussive); };
class DiffCommand : public Command {
class LIBARDOUR_API DiffCommand : public Command {
public:
DiffCommand (boost::shared_ptr<MidiModel> m, const std::string& name);
@ -79,7 +79,7 @@ public:
};
class NoteDiffCommand : public DiffCommand {
class LIBARDOUR_API NoteDiffCommand : public DiffCommand {
public:
NoteDiffCommand (boost::shared_ptr<MidiModel> m, const std::string& name) : DiffCommand (m, name) {}
@ -145,7 +145,7 @@ public:
};
/* Currently this class only supports changes of sys-ex time, but could be expanded */
class SysExDiffCommand : public DiffCommand {
class LIBARDOUR_API SysExDiffCommand : public DiffCommand {
public:
SysExDiffCommand (boost::shared_ptr<MidiModel> m, const XMLNode& node);
@ -180,7 +180,7 @@ public:
Change unmarshal_change (XMLNode *);
};
class PatchChangeDiffCommand : public DiffCommand {
class LIBARDOUR_API PatchChangeDiffCommand : public DiffCommand {
public:
PatchChangeDiffCommand (boost::shared_ptr<MidiModel>, const std::string &);
PatchChangeDiffCommand (boost::shared_ptr<MidiModel>, const XMLNode &);

View file

@ -41,7 +41,7 @@ class MidiBuffer;
* [timestamp][type][size][size bytes of raw MIDI][timestamp][type][size](etc...)
*/
template<typename T>
class LIBARDOUR_API MidiRingBuffer : public Evoral::EventRingBuffer<T> {
class /*LIBARDOUR_API*/ MidiRingBuffer : public Evoral::EventRingBuffer<T> {
public:
/** @param size Size in bytes.
*/

View file

@ -39,7 +39,7 @@ namespace ARDOUR {
class Session;
template<typename T>
class LIBARDOUR_API MPControl : public PBD::Controllable {
class /*LIBARDOUR_API*/ MPControl : public PBD::Controllable {
public:
MPControl (T initial, const std::string& name, PBD::Controllable::Flag flag,
float lower = 0.0f, float upper = 1.0f)

View file

@ -23,7 +23,12 @@
#include "ardour/libardour_visibility.h"
namespace ARDOUR {
LIBARDOUR_API extern const char* revision;
/*LIBARDOUR_API extern*/ extern const char* revision;
extern "C" {
LIBARDOUR_API const char* get_ardour_revision();
}
}
#endif

View file

@ -140,7 +140,7 @@ class WindowsVSTPlugin;
extern void setup_enum_writer ();
class LIBARDOUR_API LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager
class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager
{
public:
enum RecordState {
@ -237,7 +237,7 @@ class LIBARDOUR_API LIBARDOUR_API Session : public PBD::StatefulDestructible, pu
return _bundles.reader ();
}
struct RoutePublicOrderSorter {
struct LIBARDOUR_API RoutePublicOrderSorter {
bool operator() (boost::shared_ptr<Route>, boost::shared_ptr<Route> b);
};

View file

@ -20,6 +20,8 @@
#ifndef __libardour_visibility_h__
#define __libardour_visibility_h__
#include "ardour/libardour_visibility.h"
#ifdef LIBARDOUR_IS_IN_WIN_STATIC_LIB // #define if your project uses libardour (under Windows) as a static library
#define LIBARDOUR_IS_IN_WINDLL 0
#endif
@ -35,17 +37,14 @@
#if LIBARDOUR_IS_IN_WINDLL && !defined(LIBARDOUR_API)
#if defined(BUILDING_LIBARDOUR)
#define LIBARDOUR_API __declspec(dllexport)
#define LIBARDOUR_APICALLTYPE __cdecl
#elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point
#define LIBARDOUR_API __declspec(dllimport)
#define LIBARDOUR_APICALLTYPE __cdecl
#else
#error "Attempting to define __declspec with an incompatible compiler !"
#endif
#elif !defined(LIBARDOUR_API)
#elif !defined(LIBARDOUR_APICALLTYPE)
// Other compilers / platforms could be accommodated here (as an example, see LIBARDOUR_HELPER_DLL, below)
#define LIBARDOUR_API
#define LIBARDOUR_APICALLTYPE
#endif