Yes! CMake and dynamic library works with Borland compiler.
This commit is contained in:
parent
6275a7c260
commit
4484e75e25
|
@ -1,5 +1,6 @@
|
||||||
#if defined __cplusplus
|
#if defined __cplusplus
|
||||||
extern "C" {
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
void
|
void
|
||||||
another_one (void);
|
another_one (void);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
//#include <stdio.h>
|
//#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;
|
return (a+b) / 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue