diff --git a/c/cmake_lib/libmean/mean.c b/c/cmake_lib/libmean/mean.c index e4d580e..8755b77 100644 --- a/c/cmake_lib/libmean/mean.c +++ b/c/cmake_lib/libmean/mean.c @@ -1,5 +1,7 @@ -//#include +#if defined (__BORLANDC__) #define __DLL_MEAN__ +#endif + #include "mean.h" double DLL_SPEC mean(double a, double b) { diff --git a/c/cmake_lib/libmean/mean.h b/c/cmake_lib/libmean/mean.h index 5df4d3d..52dc490 100644 --- a/c/cmake_lib/libmean/mean.h +++ b/c/cmake_lib/libmean/mean.h @@ -1,7 +1,11 @@ -#if defined(__DLL_MEAN__) - #define DLL_SPEC __declspec(dllexport) +#if defined (__BORLANDC__) + #if defined(__DLL_MEAN__) + #define DLL_SPEC __declspec(dllexport) + #else + #define DLL_SPEC __declspec(dllimport) + #endif #else - #define DLL_SPEC __declspec(dllimport) + #define DLL_SPEC #endif