comparison README.compat @ 263:4454843ff384

* OK, we're going to have to place the host stuff in its own namespace too. Otherwise our new SV build on OSX fails to load old plugins because they pull in the host namespace PluginBase and thus report the wrong Vamp version... *sigh*
author cannam
date Thu, 20 Nov 2008 15:01:30 +0000
parents 3d98dd2ba0d6
children 03c7167e1f30
comparison
equal deleted inserted replaced
262:4a0e998a1afd 263:4454843ff384
74 For most hosts, these should be the only changes necessary; the actual 74 For most hosts, these should be the only changes necessary; the actual
75 code remains the same. 75 code remains the same.
76 76
77 Hosts that incorporate plugin code 77 Hosts that incorporate plugin code
78 ---------------------------------- 78 ----------------------------------
79 One of the changes in this version of the SDK is that classes compiled 79 One of the changes in this version of the SDK is that separate
80 into plugins are now internally enclosed in a special C++ namespace 80 top-level C++ namespaces are used for classes compiled into plugins
81 (the _VampPlugin namespace) to avoid any confusion between host and 81 (the _VampPlugin namespace) and hosts (the _VampHost namespace), to
82 plugin namespaces in unusual linkage situations. This is handled 82 avoid any confusion between host and plugin namespaces in unusual
83 transparently in most circumstances, and neither plugin nor host 83 linkage situations. This is handled transparently in most
84 authors will normally need to care about it. 84 circumstances, and neither plugin nor host authors will normally need
85 to care about it.
85 86
86 However, hosts that directly incorporate code from plugins, for 87 However, hosts that directly incorporate code from plugins, for
87 example to provide functionality that is the same as those plugins 88 example to provide functionality that is the same as those plugins
88 without having to explicitly load them, may find that they can no 89 without having to explicitly load them, may find that they can no
89 longer resolve plugin functions at link time because of this namespace 90 longer resolve plugin functions at link time because of this namespace
90 mismatch. To avoid this, the host build process should define the 91 mismatch. To avoid this, the host build process should define the
91 preprocessor flag VAMP_NO_PLUGIN_NAMESPACE when compiling the plugin 92 preprocessor flag _VAMP_NO_PLUGIN_NAMESPACE when compiling the plugin
92 code to ensure that both host and plugin code exist at the same level 93 code to ensure that both host and plugin code exist at the same level
93 of namespace. 94 of namespace. Note that the corresponding _VAMP_NO_HOST_NAMESPACE is
95 also available.
94 96
95 (If your host does this, why not make it load the plugins dynamically 97 (If your host does this, why not make it load the plugins dynamically
96 instead using the normal Vamp plugin loader method? There are many 98 instead using the normal Vamp plugin loader method? There are many
97 advantages to that.) 99 advantages to that.)
100