From 7292989a5a6fa6e8a19ce1a5a0b72f537472d842 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 12 Apr 2016 02:18:20 +0200 Subject: [PATCH] some more windows bandaids for optimized builds really this is getting UGLY. --- libs/ardour/luabindings.cc | 32 +++++++++++++++++++++++++-- libs/lua/LuaBridge/detail/ClassInfo.h | 8 ++++++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc index a475416c19..9f35d038ad 100644 --- a/libs/ardour/luabindings.cc +++ b/libs/ardour/luabindings.cc @@ -102,8 +102,10 @@ luabridge::getIdentityKey () /* ...and this is the ugly part of it. * - * We need to foward declare classes from gtk2_ardour. - * This is needed because some of the classes use objects from libardour + * We need to foward declare classes from gtk2_ardour + * end explicily list classes which are used by gtk2_ardour's bindings. + * + * This is needed because some of the GUI classes use objects from libardour * as function parameters and the .exe would re-create symbols for libardour * objects. * @@ -143,6 +145,32 @@ CLASSKEYS(std::bitset<47ul>); // LuaSignal::LAST_SIGNAL CLASSKEYS(ArdourMarker*); CLASSKEYS(ARDOUR::RouteGroup); CLASSKEYS(ARDOUR::LuaProc); +CLASSKEYS(ARDOUR::DataType); +CLASSKEYS(ARDOUR::ChanCount); +CLASSKEYS(boost::shared_ptr); +CLASSKEYS(ARDOUR::ParameterDescriptor); +CLASSKEYS(boost::shared_ptr); +CLASSKEYS(boost::shared_ptr); +CLASSKEYS(ARDOUR::LuaOSC::Address); +CLASSKEYS(ARDOUR::Session); +CLASSKEYS(ARDOUR::BufferSet); +CLASSKEYS(ARDOUR::ChanMapping); +CLASSKEYS(ARDOUR::DSP::DspShm); +CLASSKEYS(PBD::ID); +CLASSKEYS(ARDOUR::Location); +CLASSKEYS(ARDOUR::PluginInfo); +CLASSKEYS(PBD::PropertyChange); +CLASSKEYS(std::vector); +CLASSKEYS(std::list >); +CLASSKEYS(boost::shared_ptr); +CLASSKEYS(boost::shared_ptr); +CLASSKEYS(boost::weak_ptr); +CLASSKEYS(std::list >); +CLASSKEYS(std::list); +CLASSKEYS(Evoral::Beats); +CLASSKEYS(ARDOUR::AudioEngine); +CLASSKEYS(void); +CLASSKEYS(float); #endif // end windows special case diff --git a/libs/lua/LuaBridge/detail/ClassInfo.h b/libs/lua/LuaBridge/detail/ClassInfo.h index 2a0ab001fd..c64637d017 100644 --- a/libs/lua/LuaBridge/detail/ClassInfo.h +++ b/libs/lua/LuaBridge/detail/ClassInfo.h @@ -26,6 +26,12 @@ */ //============================================================================== +#ifdef COMPILER_MSVC +# define LuaBridge_API __declspec(dllexport) +#else +# define LuaBridge_API // mingw is sane WRT to static class members +#endif + /** Unique Lua registry keys for a class. Each registered class inserts three keys into the registry, whose @@ -33,7 +39,7 @@ allows a quick and reliable lookup for a metatable from a template type. */ template -class ClassInfo +class LuaBridge_API ClassInfo { public: #ifdef PLATFORM_WINDOWS