From fe6721af84a5ec31f1b185fce1f6024a5d9c7e20 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Wed, 1 Jan 2003 14:26:50 -0500 Subject: [PATCH] Shared library should export symbols on windows --- Tests/COnly/libc2.c | 2 ++ Tests/COnly/libc2.h | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Tests/COnly/libc2.c b/Tests/COnly/libc2.c index 9a6183739..0fd895664 100644 --- a/Tests/COnly/libc2.c +++ b/Tests/COnly/libc2.c @@ -1,3 +1,5 @@ +#include "libc2.h" + float LibC2Func() { return 1.0; diff --git a/Tests/COnly/libc2.h b/Tests/COnly/libc2.h index c2d47e5fd..bc26e0120 100644 --- a/Tests/COnly/libc2.h +++ b/Tests/COnly/libc2.h @@ -1 +1,11 @@ -extern float LibC2Func(); +#ifdef _WIN32 +# ifdef c2_EXPORTS +# define CM_TEST_LIB_EXPORT __declspec( dllexport ) +# else +# define CM_TEST_LIB_EXPORT __declspec( dllimport ) +# endif +#else +# define CM_TEST_LIB_EXPORT +#endif + +CM_TEST_LIB_EXPORT float LibC2Func();