Yes! CMake and dynamic library works with Borland compiler.

This commit is contained in:
Kolan Sh 2012-05-25 18:20:58 +04:00
parent 6275a7c260
commit 4484e75e25
3 changed files with 22 additions and 3 deletions

View File

@ -1,5 +1,6 @@
#if defined __cplusplus
extern "C" {
extern "C"
{
#endif
void
another_one (void);

View File

@ -1,5 +1,7 @@
//#include <stdio.h>
#define __DLL_MEAN__
#include "mean.h"
double mean(double a, double b) {
double DLL_SPEC mean(double a, double b) {
return (a+b) / 2;
}

View File

@ -1 +1,17 @@
double mean(double, double);
#if defined(__DLL_MEAN__)
#define DLL_SPEC __declspec(dllexport)
#else
#define DLL_SPEC __declspec(dllimport)
#endif
#if defined __cplusplus
extern "C"
{
#endif
double DLL_SPEC mean(double, double);
#if defined __cplusplus
}
#endif