From d903095d973922761071ea675f380f5c4c3cf2ad Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 24 Mar 2017 23:48:20 +0100 Subject: options, compat: instantiate common templates in their .dll's --- compat/simple-mat.cpp | 3 +++ compat/simple-mat.hpp | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 compat/simple-mat.cpp (limited to 'compat') diff --git a/compat/simple-mat.cpp b/compat/simple-mat.cpp new file mode 100644 index 00000000..d00a4157 --- /dev/null +++ b/compat/simple-mat.cpp @@ -0,0 +1,3 @@ +#define OTR_SIMPLE_MAT_TEMPLATE_UNIT + +#include "simple-mat.hpp" diff --git a/compat/simple-mat.hpp b/compat/simple-mat.hpp index a1509f4d..186043c0 100644 --- a/compat/simple-mat.hpp +++ b/compat/simple-mat.hpp @@ -274,3 +274,17 @@ Mat operator*(const Mat& self, num other) return ret; } +#ifdef OTR_SIMPLE_MAT_TEMPLATE_UNIT +# define OTR_SIMPLE_MAT_TEMPLATE_EXTERN +# define OTR_SIMPLE_MAT_TEMPLATE_DECLSPEC OPENTRACK_COMPAT_EXPORT +#else +# define OTR_SIMPLE_MAT_TEMPLATE_EXTERN extern +# define OTR_SIMPLE_MAT_TEMPLATE_DECLSPEC +#endif + +OTR_SIMPLE_MAT_TEMPLATE_EXTERN template class OTR_SIMPLE_MAT_TEMPLATE_DECLSPEC Mat; +OTR_SIMPLE_MAT_TEMPLATE_EXTERN template class OTR_SIMPLE_MAT_TEMPLATE_DECLSPEC Mat; +OTR_SIMPLE_MAT_TEMPLATE_EXTERN template class OTR_SIMPLE_MAT_TEMPLATE_DECLSPEC Mat; +OTR_SIMPLE_MAT_TEMPLATE_EXTERN template class OTR_SIMPLE_MAT_TEMPLATE_DECLSPEC Mat; +OTR_SIMPLE_MAT_TEMPLATE_EXTERN template class OTR_SIMPLE_MAT_TEMPLATE_DECLSPEC Mat; + -- cgit v1.2.3