From b9bbea71748dc190013d31eecd47a1edcf8a3fcc Mon Sep 17 00:00:00 2001 From: John Emmas Date: Mon, 15 May 2017 14:46:34 +0100 Subject: It might not be obvious why... but 'ARDOUR::ControlProtocol::name()' needs to be a virtual function Basically, libardour is calling functions from libardour_cp and vice versa. For example, libardour needs 'ARDOUR::ControlProtocol::name()' whereas ardour_cp needs 'ARDOUR::Route::soloed()' and various others. Ordinarily, this would require each library to get built before the other one! :-( To get around this (in MSVC at least) one of the libraries must be forced to use late binding (e.g. by declaring its functions as 'virtual'). It looks like this is already being done for most of the other functions from 'ARDOUR::ControlProtocol', so let's do it for this function too... --- libs/surfaces/control_protocol/control_protocol/control_protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/surfaces/control_protocol/control_protocol/control_protocol.h b/libs/surfaces/control_protocol/control_protocol/control_protocol.h index 0068cd6b66..12c5befd22 100644 --- a/libs/surfaces/control_protocol/control_protocol/control_protocol.h +++ b/libs/surfaces/control_protocol/control_protocol/control_protocol.h @@ -47,7 +47,7 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope ControlProtocol (Session&, std::string name); virtual ~ControlProtocol(); - std::string name() const { return _name; } + virtual std::string name() const { return _name; } virtual int set_active (bool yn); bool active() const { return _active; } -- cgit v1.2.3