From 6c1ae190d3a14d2bfa803275feebfd5cb6b0d409 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Thu, 14 Nov 2024 21:59:14 +0000 Subject: [PATCH] core: don't use declspec(dllexport) when compiling/linking to static library this is required due to function names being decorated differently by MSVC when building a .dll file --- core/include/blue/core/misc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/include/blue/core/misc.h b/core/include/blue/core/misc.h index 79f8a4e..529bf72 100644 --- a/core/include/blue/core/misc.h +++ b/core/include/blue/core/misc.h @@ -15,11 +15,15 @@ (sizeof((arg_type[]) {__VA_ARGS__}) / sizeof(arg_type)) #ifdef _MSC_VER +#ifdef BLUELIB_STATIC +#define BLUE_API extern +#else #ifdef BLUELIB_EXPORT #define BLUE_API extern __declspec(dllexport) #else #define BLUE_API extern __declspec(dllimport) #endif +#endif #else #define BLUE_API extern #endif