Fix Windows builds

This fixes a missing symbol error due to the weird way how
Windows maps the same, identical symbols using different addresses
in .dll and .exe.  Here specifically for

int luabridge::CFunc::vectorToArray<double, std::vector<double, std::allocator<double> > >(lua_State*)

which was added in 5e1a73a28c resulting in

gtk2_ardour/luainstance.cc error: explicit instantiation of 'static const void* luabridge::ClassInfo<T>::getStaticKey() [with T = std::vector<double>]' but no definition available [-fpermissive]
gtk2_ardour/luainstance.cc error: explicit instantiation of 'static const void* luabridge::ClassInfo<T>::getClassKey() [with T = std::vector<double>]' but no definition available [-fpermissive]
gtk2_ardour/luainstance.cc error: explicit instantiation of 'static const void* luabridge::ClassInfo<T>::getConstKey() [with T = std::vector<double>]' but no definition available [-fpermissive]
This commit is contained in:
Robin Gareus 2019-12-03 02:27:44 +01:00
parent e3544db3aa
commit 1caef183bf
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 30 additions and 0 deletions

View File

@ -62,6 +62,36 @@
static const char* ui_scripts_file_name = "ui_scripts";
#ifdef PLATFORM_WINDOWS
/* see libs/ardour/luabindings.cc for details */
template <class T>
void const*
luabridge::ClassInfo<T>::getStaticKey ()
{
static char value;
return &value;
}
template <class T>
void const*
luabridge::ClassInfo<T>::getClassKey ()
{
static char value;
return &value;
}
template <class T>
void const*
luabridge::ClassInfo<T>::getConstKey ()
{
static char value;
return &value;
}
CLASSKEYS(std::vector<double>);
#endif
namespace LuaCairo {
/** wrap RefPtr< Cairo::ImageSurface >
*