From 3deb6c59a53eb00430099c658dcfb7f1f91952e6 Mon Sep 17 00:00:00 2001 From: fintarin Date: Sun, 7 Apr 2024 01:02:15 +0400 Subject: [PATCH] Use dllexport for static variables --- include/fintamath/core/CoreUtils.hpp | 6 ++++++ include/fintamath/core/MathObjectBody.hpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/fintamath/core/CoreUtils.hpp b/include/fintamath/core/CoreUtils.hpp index 5d03f73ed..bd922271c 100644 --- a/include/fintamath/core/CoreUtils.hpp +++ b/include/fintamath/core/CoreUtils.hpp @@ -3,6 +3,12 @@ #include #include +#ifdef _WIN32 +#define FINTAMATH_API __declspec(dllexport) +#else +#define FINTAMATH_API +#endif + namespace fintamath { template diff --git a/include/fintamath/core/MathObjectBody.hpp b/include/fintamath/core/MathObjectBody.hpp index ccb3c6c44..0e718d1f8 100644 --- a/include/fintamath/core/MathObjectBody.hpp +++ b/include/fintamath/core/MathObjectBody.hpp @@ -13,7 +13,7 @@ public: \ } \ \ private: \ - static constexpr detail::MathObjectClassImpl \ + FINTAMATH_API static constexpr detail::MathObjectClassImpl \ objClass{#Class, Parent::getClassStatic()}; #define FINTAMATH_PARENT_CLASS_BODY(Class, Parent) \