some more windows bandaids for optimized builds
authorRobin Gareus <robin@gareus.org>
Tue, 12 Apr 2016 00:18:20 +0000 (02:18 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 12 Apr 2016 00:18:20 +0000 (02:18 +0200)
really this is getting UGLY.

libs/ardour/luabindings.cc
libs/lua/LuaBridge/detail/ClassInfo.h

index a475416c19a0fe70b4038bca0c61de680b04cfbb..9f35d038ad1d7730b503fc8a7fc1c616e582a526 100644 (file)
@@ -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<ARDOUR::Processor>);
+CLASSKEYS(ARDOUR::ParameterDescriptor);
+CLASSKEYS(boost::shared_ptr<ARDOUR::AutomationList>);
+CLASSKEYS(boost::shared_ptr<Evoral::ControlList>);
+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<std::string>);
+CLASSKEYS(std::list<boost::shared_ptr<ARDOUR::Route> >);
+CLASSKEYS(boost::shared_ptr<ARDOUR::PluginInfo>);
+CLASSKEYS(boost::shared_ptr<ARDOUR::Region>);
+CLASSKEYS(boost::weak_ptr<ARDOUR::Route>);
+CLASSKEYS(std::list<boost::shared_ptr<ARDOUR::Region> >);
+CLASSKEYS(std::list<ARDOUR::AudioRange>);
+CLASSKEYS(Evoral::Beats);
+CLASSKEYS(ARDOUR::AudioEngine);
+CLASSKEYS(void);
+CLASSKEYS(float);
 
 #endif // end windows special case
 
index 2a0ab001fd26ed645d80a14f299d2ff48fdc91f2..c64637d01736415a0bbc881834f8e40634022e9e 100644 (file)
 */
 //==============================================================================
 
+#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 T>
-class ClassInfo
+class LuaBridge_API ClassInfo
 {
 public:
 #ifdef PLATFORM_WINDOWS