From 319e9b2b12a1698136a8fc17c9a48c49488d1164 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 16 Apr 2020 13:23:36 +0200 Subject: [PATCH] Get rid of the `main()` fallback entry point --- src/plugin/plugin.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/plugin/plugin.cpp b/src/plugin/plugin.cpp index 67bd1e46..aa00cecb 100644 --- a/src/plugin/plugin.cpp +++ b/src/plugin/plugin.cpp @@ -24,15 +24,14 @@ #define VST_EXPORT __attribute__((visibility("default"))) // The main entry point for VST plugins should be called `VSTPluginMain``. The -// other two exist for legacy reasons since some old hosts might still use +// other one exist for legacy reasons since some old hosts might still use // them.` extern "C" { extern VST_EXPORT AEffect* VSTPluginMain(audioMasterCallback); -VST_EXPORT AEffect* main(audioMasterCallback audioMaster) { - return VSTPluginMain(audioMaster); -} - +// There's also another possible legacy entry point just called `main`, but GCC +// will refuse to compile a function called `main` that's not a regular C++ main +// function VST_EXPORT AEffect* main_plugin(audioMasterCallback audioMaster) { return VSTPluginMain(audioMaster); }