It might not be obvious why... but 'ARDOUR::ControlProtocol::name()' needs to be...
authorJohn Emmas <johne53@tiscali.co.uk>
Mon, 15 May 2017 13:46:34 +0000 (14:46 +0100)
committerJohn Emmas <johne53@tiscali.co.uk>
Mon, 15 May 2017 13:46:34 +0000 (14:46 +0100)
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

index 0068cd6b66de33fc045d07739b7df272a1ff872a..12c5befd229e17a41ea6221907ad76dc7a8b3149 100644 (file)
@@ -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; }