GetPluginFactory() def-file vs. declspec

in plugininterfaces, ivstcomponent.h defines GetPluginFactory() with EXPORT_FACTORY
EXPORT_FACTORY IPluginFactory* PLUGIN_API GetPluginFactory ()
but ipluginbase.h declares this without it
Steinberg::IPluginFactory* PLUGIN_API GetPluginFactory ();

EXPORT_FACTORY however is defined much “later” in public.sdk in pluginfactory.h as
#if defined(GNUC) && ((GNUC >= 4) || ((GNUC == 3) && (GNUC_MINOR >= 1)))
#define EXPORT_FACTORY attribute ((visibility (“default”)))

This is a problem because in our implementation we would like to skip the Windows .def file by using
#if defined(_MSC_VER)
#define EXPORT_FACTORY __declspec(dllexport)

This is has been supported since at least VS2010 and would mirror the Mac implementation, but it fails to build with the current SDK due to the above inconsistency.
Would it be possible for the SDK to (preferably) adopt that __declspec(dllexport), or else to consistently use EXPORT_FACTORY in plugininterfaces so that we can just define it?


PS: the latter requires additional #ifndef EXPORT_FACTORY define EXPORT_FACTORY #endif
PSS: we’re not including/using pluginfactory.h

yes we will see what we could do here, we will need to adapt our cmake too… keep you inform…

In the next update we will remove .def file for Windows.

Thanks Yvan! :slight_smile:

Just upgraded to 3.7.1 and this work well now - thanks again!