From 3d4e8bb3e62930c6d363299227be74902c9c737f Mon Sep 17 00:00:00 2001 From: okuoku Date: Sun, 23 Jun 2019 05:45:44 +0900 Subject: [PATCH] Introduce SEXP_STATIC_LIBRARY Introduce SEXP_STATIC_LIBRARY to support static-library build on Win32/Win64. On Win32, symbol visibility is enforced on DLL builds so we need to dedicated ABI on static-library builds. --- include/chibi/features.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/chibi/features.h b/include/chibi/features.h index 5646be20..ccf27b04 100644 --- a/include/chibi/features.h +++ b/include/chibi/features.h @@ -846,11 +846,15 @@ #endif #ifdef _WIN32 +#ifdef SEXP_STATIC_LIBRARY +#define SEXP_API extern +#else #ifdef BUILDING_DLL #define SEXP_API __declspec(dllexport) #else #define SEXP_API __declspec(dllimport) #endif +#endif #else #define SEXP_API extern #endif