From 653dcc6843a96cd23e5e408797a539a255b45aaa Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 3 Apr 2021 18:54:33 +0200 Subject: [PATCH] Fix linking with unity builds and VST3 SDK 3.7.2 --- src/plugin/vst3-plugin.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugin/vst3-plugin.cpp b/src/plugin/vst3-plugin.cpp index 92258c0d..6d9eff1e 100644 --- a/src/plugin/vst3-plugin.cpp +++ b/src/plugin/vst3-plugin.cpp @@ -16,6 +16,14 @@ #include "bridges/vst3.h" +// FIXME: The VST3 SDK as of version 3.7.2 now includes multiple local functions +// called `InitModule` and `DeinitModule`: one in the new +// `public.sdk/source/main/initmodule.cpp`, and the existing ones in the +// OS-specific `*main.cpp` files. These cause linking errors during unity +// builds, so we'll just rename the ones in this include so we can stay +// as close to the vanilla SDK as possible. +#define InitModule init_module +#define DeinitModule deinit_module #include // Because VST3 plugins consist of completely independent components that have