Fix for cmake_lib to build under Gcc, Borland, MinGW.

This commit is contained in:
Kolan Sh 2012-05-25 19:19:28 +04:00
parent aeb794558b
commit fa4102004c
2 changed files with 10 additions and 4 deletions

View File

@ -1,5 +1,7 @@
//#include <stdio.h>
#if defined (__BORLANDC__)
#define __DLL_MEAN__
#endif
#include "mean.h"
double DLL_SPEC mean(double a, double b) {

View File

@ -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