From 0c0c93b87427085237f803ead2daef6f90d5c985 Mon Sep 17 00:00:00 2001 From: Milan Skocic Date: Sat, 25 Nov 2023 10:37:01 +0100 Subject: [PATCH] ENH: Add IMPORT macro for windows support in R283. --- include/iapws_r283.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/iapws_r283.h b/include/iapws_r283.h index c86beba..8242174 100644 --- a/include/iapws_r283.h +++ b/include/iapws_r283.h @@ -6,13 +6,19 @@ #ifndef IAPWS_R283_H #define IAPWS_R283_H -extern const double iapws_r283_capi_Tc_H2O; -extern const double iapws_r283_capi_Tc_D2O; +#if _MSC_VER +#define ADD_IMPORT __declspec(dllimport) +#else +#define ADD_IMPORT +#endif + +ADD_IMPORT const double iapws_r283_capi_Tc_H2O; +ADD_IMPORT const double iapws_r283_capi_Tc_D2O; -extern const double iapws_r283_capi_pc_H2O; -extern const double iapws_r283_capi_pc_D2O; +ADD_IMPORT const double iapws_r283_capi_pc_H2O; +ADD_IMPORT const double iapws_r283_capi_pc_D2O; -extern const double iapws_r283_capi_rhoc_H2O; -extern const double iapws_r283_capi_rhoc_D2O; +ADD_IMPORT const double iapws_r283_capi_rhoc_H2O; +ADD_IMPORT const double iapws_r283_capi_rhoc_D2O; #endif